Skip to content

Commit

Permalink
Added feerate_floor and feerates object to estimatefees method.
Browse files Browse the repository at this point in the history
  • Loading branch information
ca-ruz authored and chrisguida committed Aug 21, 2024
1 parent e32a8ee commit 39ef72f
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions sauron/sauron.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,18 @@ def estimatefees(plugin, **kwargs):
else:
# It returns sat/vB, we want sat/kVB, so multiply everything by 10**3
slow = int(feerates["144"] * 10**3)
normal = int(feerates["5"] * 10**3)
urgent = int(feerates["3"] * 10**3)
normal = int(feerates["12"] * 10**3)
urgent = int(feerates["6"] * 10**3)
very_urgent = int(feerates["2"] * 10**3)

feerate_floor = int(feerates["1008"] * 10**3)
feerates = [
{"blocks": 2, "feerate": very_urgent},
{"blocks": 6, "feerate": urgent},
{"blocks": 12, "feerate": normal},
{"blocks": 144, "feerate": slow}
]

return {
"opening": normal,
"mutual_close": normal,
Expand All @@ -213,6 +221,8 @@ def estimatefees(plugin, **kwargs):
"penalty": urgent,
"min_acceptable": slow // 2,
"max_acceptable": very_urgent * 10,
"feerate_floor": feerate_floor,
"feerates": feerates
}


Expand Down

0 comments on commit 39ef72f

Please sign in to comment.