-
Notifications
You must be signed in to change notification settings - Fork 37.7k
wallet: Fix origfee return for bumpfee with feerate arg #17643
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
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
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.
ACK a0655ad
src/wallet/feebumper.cpp
Outdated
@@ -108,12 +108,11 @@ static feebumper::Result CheckFeeRate(const CWallet& wallet, const CWalletTx& wt | |||
return feebumper::Result::OK; | |||
} | |||
|
|||
static CFeeRate EstimateFeeRate(const CWallet& wallet, const CWalletTx& wtx, CCoinControl& coin_control, CAmount& old_fee) | |||
static CFeeRate EstimateFeeRate(const CWallet& wallet, const CWalletTx& wtx, CCoinControl& coin_control, CAmount old_fee) |
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.
Could be const
, I think ?
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.
done, and re-ordered the arguments to be all const then non-const.
Thanks for tackling this quickly. I'm not too familiar with this part of the code: is there any scenario where the wrong fee could have been selected due to the uninitialized read? What is the likely user impact? |
No it's simply a reporting issue.
…On Sun, Dec 1, 2019, 4:51 PM practicalswift ***@***.***> wrote:
@instagibbs <https://github.com/instagibbs>
Thanks for tackling this quickly.
I'm not too familiar with this part of the code: is there any scenario
where the wrong fee could have been selected due to the uninitialized read?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#17643?email_source=notifications&email_token=ABMAFUYWFWI3Y4YRACOKHYDQWQWUJA5CNFSM4JTMA4CKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFRWY4Y#issuecomment-560163955>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABMAFU6LGFOFK724EYW4DG3QWQWUJANCNFSM4JTMA4CA>
.
|
a0655ad
to
02afb0c
Compare
A demo of the unitialized read (prior to the fix):
Code:
|
With the patch in this PR applied:
|
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.
ACK 02afb0c
ACK. Tested by running the test without re-compiling bitcoind |
02afb0c Fix origfee return for bumpfee with feerate arg (Gregory Sanders) Pull request description: fixes #17642 and adds a simple test that would have caught it ACKs for top commit: achow101: ACK 02afb0c Tree-SHA512: 303e392e05407f204dffe360689b5bb5dc77fd462dd0e489bc0b6c8f94f89ab7fe2bd8cb47e4dc6dc5c23a619826d15f3bf6b02b2c8e96402fbb51953c462e2d
…ate arg 02afb0c Fix origfee return for bumpfee with feerate arg (Gregory Sanders) Pull request description: fixes bitcoin#17642 and adds a simple test that would have caught it ACKs for top commit: achow101: ACK 02afb0c Tree-SHA512: 303e392e05407f204dffe360689b5bb5dc77fd462dd0e489bc0b6c8f94f89ab7fe2bd8cb47e4dc6dc5c23a619826d15f3bf6b02b2c8e96402fbb51953c462e2d
Github-Pull: bitcoin#17643 Rebased-From: 02afb0c
bd8c6f1 Fix origfee return for bumpfee with feerate arg (Gregory Sanders) Pull request description: Backport of Github-Pull: #17643 Rebased-From: 02afb0c ACKs for top commit: fanquake: ACK bd8c6f1 - the appveyor failure is unrelated. instagibbs: utACK bd8c6f1 Tree-SHA512: 7e420a3fe02503194b6fc8eae5277c46289cd6abe131b2513ad80422819e6bafbc7768e7be344d4132ebdbc24846d459ba2a271be184725d818dff77510fa4de
Was backported in #17859. |
[0.19] Backports bitcoin#17858 Unbreak build with Boost 1.72.0 bitcoin#17654 cli: fix Fatal LevelDB error when specifying -blockfilterindex=basic twice bitcoin#17687 rpc: require second argument only for scantxoutset start action bitcoin#17728 wallet: Fix origfee return for bumpfee with feerate arg bitcoin#17643 test: fix "bitcoind already running" warnings on macOS bitcoin#17488 net: Log to net category for exceptions in ProcessMessages bitcoin#17762 Updates to appveyor config for VS2019 and Qt5.9.8 + msvc project fixes bitcoin#17364 Appveyor improvement - text file for vcpkg package list bitcoin#17416 Update msvc build for Visual Studio 2019 v16.4 bitcoin#17736 scripts: fix symbol-check & security-check argument passing bitcoin#17857 qt: Periodic translations update for 0.19 branch IsUsedDestination should count any known single-key address bitcoin#17621 init: Stop indexes on shutdown after ChainStateFlushed callback. bitcoin#17897 qt: Translations update pre-rc1 wallet: Reset reused transactions cache bitcoin#17843 Squashed 'src/univalue/' changes from 7890db9..98261b1 0.19: Update univalue subtree bitcoin#18100 qt: Pre-rc2 translations update
[0.19] Backports bitcoin#17858 Unbreak build with Boost 1.72.0 bitcoin#17654 cli: fix Fatal LevelDB error when specifying -blockfilterindex=basic twice bitcoin#17687 rpc: require second argument only for scantxoutset start action bitcoin#17728 wallet: Fix origfee return for bumpfee with feerate arg bitcoin#17643 test: fix "bitcoind already running" warnings on macOS bitcoin#17488 net: Log to net category for exceptions in ProcessMessages bitcoin#17762 Updates to appveyor config for VS2019 and Qt5.9.8 + msvc project fixes bitcoin#17364 Appveyor improvement - text file for vcpkg package list bitcoin#17416 Update msvc build for Visual Studio 2019 v16.4 bitcoin#17736 scripts: fix symbol-check & security-check argument passing bitcoin#17857 qt: Periodic translations update for 0.19 branch IsUsedDestination should count any known single-key address bitcoin#17621 init: Stop indexes on shutdown after ChainStateFlushed callback. bitcoin#17897 qt: Translations update pre-rc1 wallet: Reset reused transactions cache bitcoin#17843 Squashed 'src/univalue/' changes from 7890db9..98261b1 0.19: Update univalue subtree bitcoin#18100 qt: Pre-rc2 translations update [0.19] Further 0.19 backports bitcoin#18218 build: don't embed a build-id when building libdmg-hfsplus bitcoin#18004
…ate arg 02afb0c Fix origfee return for bumpfee with feerate arg (Gregory Sanders) Pull request description: fixes bitcoin#17642 and adds a simple test that would have caught it ACKs for top commit: achow101: ACK 02afb0c Tree-SHA512: 303e392e05407f204dffe360689b5bb5dc77fd462dd0e489bc0b6c8f94f89ab7fe2bd8cb47e4dc6dc5c23a619826d15f3bf6b02b2c8e96402fbb51953c462e2d
fixes #17642 and adds a simple test that would have caught it