Skip to content
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

asset: Implement asset.FeeRater for SPV wallets and minor refactor #2356

Merged
merged 1 commit into from May 18, 2023

Conversation

ukane-philemon
Copy link
Contributor

Closes: #2354

Signed-off-by: Philemon Ukane <ukanephilemon@gmail.com>
Copy link
Member

@chappjc chappjc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Will test it out, but looks right.

// Bitcoin Cash uses estimatefee instead of estimatesmartfee, and even
// then, they modified it from the old Bitcoin Core estimatefee by
// removing the confirmation target argument.
cloneCFG.FeeEstimator = estimateFee
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch moving this under here. Looks like LegacyBalance: cfg.Type != walletTypeSPV, above would be best done in this case as well, but it's not wrong presently, so nbd.

Comment on lines 983 to 984
var _ asset.FeeRater = (*ExchangeWalletFullNode)(nil)
var _ asset.FeeRater = (*ExchangeWalletNoAuth)(nil)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two assertions are a bit pointless now, but they don't hurt either.

@chappjc chappjc merged commit 0f9b6df into decred:master May 18, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

asset: Make spv wallet a FeeRater and use NoLocalFeeRate for spv wallets.
2 participants