While working with RBF in the GUI, the exception in IsRBFOptIn() (throw std::runtime_error("Cannot determine RBF opt-in signal for non-mempool transaction\n")) could be unexpected.
Tiny refactor of `IsRBFOptIn`, avoid exception #7812
pull jonasschnelli wants to merge 1 commits into bitcoin:master from jonasschnelli:2016/04/rbf_refact changing 3 files +19 −16-
jonasschnelli commented at 12:43 PM on April 5, 2016: contributor
- jonasschnelli added the label Refactoring on Apr 5, 2016
-
MarcoFalke commented at 12:49 PM on April 5, 2016: member
Concept ACK
-
sdaftuar commented at 1:02 PM on April 5, 2016: member
Looks good, thanks for cleaning this up. This code is tested in
listtransactions.py, which passes on my machine, so ACK (assuming travis agrees). -
in src/wallet/rpcwallet.cpp:None in 1e211e2c56 outdated
87 | - rbfStatus = "yes"; 88 | - } else { 89 | - rbfStatus = "unknown"; 90 | - } 91 | - } else if (IsRBFOptIn(*mempool.mapTx.find(hash), mempool)) { 92 | + RBFTransactionState rbfState = IsRBFOptIn(wtx, mempool);
sipa commented at 1:03 PM on April 5, 2016:Use a switch case?
jonasschnelli commented at 1:05 PM on April 5, 2016:Meh. Had that first, but the if/elseif uses less lines (just two conditions).
paveljanik commented at 8:37 AM on April 6, 2016:In this case, I think '?' operator is the best solution here... Isn't FINAL case missing here anyway?
jonasschnelli commented at 8:58 AM on April 6, 2016:I think the
?operator does not fit well for a non-boolean. TheFINALcase is handled by the default value set at L82.paveljanik commented at 7:12 PM on April 5, 2016: contributorCommit message typo: expection -> exception
dcousens commented at 12:23 AM on April 6, 2016: contributorutACK 1e211e2
Refactor IsRBFOptIn, avoid exception 4f7c959af1jonasschnelli force-pushed on Apr 6, 2016jonasschnelli commented at 9:00 AM on April 6, 2016: contributorForce push fixed the git commit message typo.
laanwj commented at 11:03 AM on April 6, 2016: membersipa commented at 2:56 PM on April 6, 2016: memberlaanwj merged this on Apr 14, 2016laanwj closed this on Apr 14, 2016laanwj referenced this in commit 430fffefaa on Apr 14, 2016codablock referenced this in commit 0ac854c8d1 on Sep 16, 2017codablock referenced this in commit 3573434c97 on Sep 19, 2017codablock referenced this in commit c176f6c5b5 on Dec 20, 2017MarcoFalke locked this on Sep 8, 2021Labels
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 06:15 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 06:15 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me