glightning: update FeeRates to match current CLN response schema#29
Open
Antisys wants to merge 1 commit intoElementsProject:masterfrom
Open
glightning: update FeeRates to match current CLN response schema#29Antisys wants to merge 1 commit intoElementsProject:masterfrom
Antisys wants to merge 1 commit intoElementsProject:masterfrom
Conversation
The feerates RPC response changed in CLN v24.05+. The old urgent/normal/slow fields were replaced by an estimates array with blockcount/feerate/smoothed_feerate entries. New fields were added (floor, unilateral_anchor_close, splice) and the warning field was renamed to warning_missing_feerates. Update FeeRateDetails to match the current schema and add FeeRateEstimateEntry for the estimates array. Update OnchainEstimate with the new nonanchor field. Fixes ElementsProject#18.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
feeratesRPC response changed in CLN v24.05+. The oldurgent/normal/slowfields were removed and replaced by anestimatesarray. This causedFeeRateDetails.Urgent,.Normal, and.Slowto always return 0.This PR updates the Go structs to match the current CLN schema:
Urgent,Normal,Slow,DelayedToUs,HtlcResolutionfromFeeRateDetailsFloor,Estimates,UnilateralAnchorClose,SpliceFeeRateEstimateEntrystruct for the estimates arrayUnilateralCloseNonanchorSatoshistoOnchainEstimatewarningtowarning_missing_feeratesBreaking change: callers using
.Details.Urgent,.Details.Normal,.Details.Slowmust migrate to.Details.Estimates(indexed by blockcount).Fixes #18.
Test plan
go test ./glightning/...passes