Git Product home page Git Product logo

Comments (6)

Crypt-iQ avatar Crypt-iQ commented on July 21, 2024 2

@saubyk add to 18.0?

from lnd.

saubyk avatar saubyk commented on July 21, 2024

@saubyk add to 18.0?

makes sense. added.

from lnd.

saubyk avatar saubyk commented on July 21, 2024

cc: @yyforyongyu

from lnd.

yyforyongyu avatar yyforyongyu commented on July 21, 2024

But in the extreme case of a next-block deadline, LinearFeeFunction will return the min feerate instead of the max, which is quite bad.

What do you mean by saying next-block deadline? That we only have 1 block left till it times out? What is this min feerate?

from lnd.

morehouse avatar morehouse commented on July 21, 2024

What do you mean by saying next-block deadline? That we only have 1 block left till it times out? What is this min feerate?

Here's an example graph of the LinearFeeFunction. The min feerate is the starting feerate. The max feerate is the ending feerate.

image

Now imagine we call SweepInput with a deadline 1 block away. The fee function will be initialized with a width of 1 and starting feerate at the minimum of the feerate line. After 1 block (i.e. deadline missed), the feerate will be immediately bumped to the maximum of the feerate line.

But for this next-block deadline case, we really don't want a sloped line at all -- we want to start right at the maximum.

from lnd.

perrytheveganancap avatar perrytheveganancap commented on July 21, 2024

func (l *LinearFeeFunction) feeRateAtPosition(p uint32) chainfee.SatPerKWeight {
if p >= l.width - 1 {
return l.endingFeeRate
}
...
}
does this suggestion fix the issue located in /sweep/fee_function.go

from lnd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.