diff options
author | Andrew Chow <github@achow101.com> | 2023-11-07 11:23:12 -0500 |
---|---|---|
committer | Andrew Chow <github@achow101.com> | 2023-11-07 11:29:29 -0500 |
commit | 3da69c464f16841a5c8d9fcc9c63238ab807d5ff (patch) | |
tree | d541cdd461867951a670f6610b941a1999cffcc3 /src/rpc/mining.cpp | |
parent | 2b3f43b96ef0b674bf350f50f317477b8d3e1e56 (diff) | |
parent | f06016d77d848133fc6568f287bb86b644c9fa69 (diff) |
Merge bitcoin/bitcoin#28546: wallet: prevent bugs from invalid transaction heights with asserts, comments, and refactoring
f06016d77d848133fc6568f287bb86b644c9fa69 wallet: Add asserts to detect unset transaction height values (Ryan Ofsky)
262a78b13365e5318741187fde431c4974539494 wallet, refactor: Add CWalletTx::updateState function (Ryan Ofsky)
Pull request description:
Originally, this PR fixed a wallet migration bug that could cause the watchonly wallet created by legacy wallet migration to have incorrect transaction height values. A different fix for the bug was implemented in #28609, but that PR did not add any test coverage that would have caught the bug, and didn't include other changes from this PR intended to prevent problems from invalid transaction heights.
This PR adds new asserts to catch invalid transaction heights, which would trigger test failures without bugfix in #28609. This PR also refactors code and adds comments to clarify assumptions and make it less likely a bug from invalid transaction height values would be introduced.
ACKs for top commit:
achow101:
ACK f06016d77d848133fc6568f287bb86b644c9fa69
Sjors:
utACK f06016d77d848133fc6568f287bb86b644c9fa69
furszy:
Code review ACK f06016d
Tree-SHA512: 82657c403724d60354f7676b53bcfcc95bdc5864e051a2eb8bfad09d8ad35615393b2d6b432b46f908def9be37bebded3a55ec9ae19e19371d35897fe842c92e
Diffstat (limited to 'src/rpc/mining.cpp')
0 files changed, 0 insertions, 0 deletions