-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[2/5]sweep: refactor fee estimation and introduce UtxoAggregator
#8422
Changes from all commits
c3f9c28
9745a1c
aedf971
38985ad
32a2ca4
b5f58ee
b249451
81874f8
5abfb39
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,6 +85,7 @@ func coopCloseWithHTLCs(ht *lntest.HarnessTest) { | |
closeClient := alice.RPC.CloseChannel(&lnrpc.CloseChannelRequest{ | ||
ChannelPoint: chanPoint, | ||
NoWait: true, | ||
TargetConf: 6, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So then does this already have implications to the existing/default RPC behavior? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will affect users who specify neither feerate nor conf target, which is unlikely? So the previous behavior is, when nothing specified, default to conf target of 6, while the current behavior is, you must specify either conf target or feerate. |
||
}) | ||
ht.AssertChannelInactive(bob, chanPoint) | ||
|
||
|
@@ -184,6 +185,7 @@ func coopCloseWithHTLCsWithRestart(ht *lntest.HarnessTest) { | |
ChannelPoint: chanPoint, | ||
NoWait: true, | ||
DeliveryAddress: newAddr.Address, | ||
TargetConf: 6, | ||
}) | ||
|
||
// Assert that both nodes see the channel as waiting for close. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good area to start using an
fn.Either
as mentioned before to encode this restriction into the types themselves.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the
tlv
package is not updated in go mod yet, will do and see how it can help.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this PR did not touch any of these functions, currently
SatPerVbyte
andTargetConf
are still both optional fields at least insendCoins
, would there be upcoming PRs to enforce this from the client side?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SendCoins
useCalculateFeeRate
which enforce this check.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah so I think there should be a check here on the lncli side to ensure at least either targetconf or satvbyte is set. Maybe for OpenChannel, CloseChannel etc. as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updating the docs on flags as well as they are both optional.
I do not have much context about this change or why it is needed but we can either ensure these lncli commands have these flags or if they are missing the SendCoins RPC function and other functions can set a default before it is passed to the
CalculateFeeRate
function, for user experience.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
think an error will be returned from the cli if not set since it's calling the RPC? Don't think it's a good idea to set the default here - it's a very sensitive param, and the users need to set it themselves.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is true but I think a prelim check for these kind of things is usually done on the lncli function.
Also my thinking is that it is no sensitive since initially users did not need to worry about it and a default was used under the hoodie if not supplied.