wallet: upgradewallet fixes, improvements, test coverage #20403

pull jonatack wants to merge 5 commits into bitcoin:master from jonatack:upgradewallet-improvements changing 5 files +79 −54
  1. jonatack commented at 6:21 pm on November 16, 2020: member

    This follows up on #18836 and #20282 to fix and improve the as-yet unreleased upgradewallet feature and also implement review follow-up in #18836 (review).

    This PR fixes 4 upgradewallet issues:

    • this bug: #20403 (review)
    • it returns nothing in the absence of an RPC error, which isn’t reassuring for users
    • it returns the same thing both in the case of a successful upgrade and when no upgrade took place
    • the error message object is currently dead code

    This PR fixes the above and provides:

    …user feedback to not silently return without upgrading

    0{
    1  "wallet_name": "disable private keys",
    2  "previous_version": 169900,
    3  "current_version": 169900,
    4  "result": "Already at latest version. Wallet version unchanged."
    5}
    

    …better feedback after successfully upgrading

    0{
    1  "wallet_name": "watch-only",
    2  "previous_version": 159900,
    3  "current_version": 169900,
    4  "result": "Wallet upgraded successfully from version 159900 to version 169900."
    5}
    

    …helpful error responses

     0{
     1  "wallet_name": "blank",
     2  "previous_version": 169900,
     3  "current_version": 169900,
     4  "error": "Cannot downgrade wallet from version 169900 to version 159900. Wallet version unchanged."
     5}
     6{
     7  "wallet_name": "blank",
     8  "previous_version": 130000,
     9  "current_version": 130000,
    10  "error": "Cannot upgrade a non HD split wallet from version 130000 to version 169899 without upgrading to support pre-split keypool. Please use version 169900 or no version specified."
    11}
    

    updated help:

     0upgradewallet ( version )
     1
     2Upgrade the wallet. Upgrades to the latest version if no version number is specified.
     3New keys may be generated and a new wallet backup will need to be made.
     4Arguments:
     51. version    (numeric, optional, default=169900) The version number to upgrade to. Default is the latest wallet version.
     6
     7Result:
     8{                            (json object)
     9  "wallet_name" : "str",     (string) Name of wallet this operation was performed on
    10  "previous_version" : n,    (numeric) Version of wallet before this operation
    11  "current_version" : n,     (numeric) Version of wallet after this operation
    12  "result" : "str",          (string, optional) Description of result, if no error
    13  "error" : "str"            (string, optional) Error message (if there is one)
    14}
    
  2. in src/wallet/wallet.cpp:4131 in cabea15557 outdated
    4125@@ -4126,7 +4126,9 @@ bool CWallet::UpgradeWallet(int version, bilingual_str& error, std::vector<bilin
    4126     }
    4127 
    4128     // Permanently upgrade to the version
    4129-    SetMinVersion(GetClosestWalletFeature(version));
    4130+    const WalletFeature new_version{GetClosestWalletFeature(version)};
    4131+    SetMinVersion(new_version);
    4132+    version = static_cast<int>(new_version); // return actual updated version
    


    achow101 commented at 6:34 pm on November 16, 2020:
    Is static_cast necessary here? WalletFeature should already be an int.

    jonatack commented at 6:38 pm on November 16, 2020:
    Oh you’re right, looks like we can just do version = new_version here. Will test a push without the cast. Thanks!
  3. achow101 commented at 6:34 pm on November 16, 2020: member
    Code review ACK b95925c751fb97a1a17bf5a540ec06f0634ea72e
  4. DrahtBot commented at 6:36 pm on November 16, 2020: member

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Conflicts

    No conflicts as of last run.

  5. jonatack force-pushed on Nov 16, 2020
  6. jonatack commented at 6:46 pm on November 16, 2020: member

    Removed the cast in UpgradeWallet() per git diff b95925c 377fa31 (thanks!)

    0@@ -4128,7 +4128,7 @@ bool CWallet::UpgradeWallet(int& version, bilingual_str& error, std::vector<bili
    1     // Permanently upgrade to the version
    2     const WalletFeature new_version{GetClosestWalletFeature(version)};
    3     SetMinVersion(new_version);
    4-    version = static_cast<int>(new_version); // return actual updated version
    5+    version = new_version; // return actual updated version
    
  7. achow101 commented at 6:50 pm on November 16, 2020: member
    ACK 377fa31
  8. DrahtBot added the label RPC/REST/ZMQ on Nov 16, 2020
  9. DrahtBot added the label Wallet on Nov 16, 2020
  10. in src/wallet/rpcwallet.cpp:4503 in 377fa31c0e outdated
    4498+    obj.pushKV("current_version", version);
    4499+    if (!result.empty()) {
    4500+        obj.pushKV("result", result);
    4501+    }
    4502     if (!error.empty()) {
    4503         obj.pushKV("error", error.original);
    


    MarcoFalke commented at 9:08 am on November 17, 2020:

    It looks like this is dead code, and always has been.

    It would be easier to have one way to deal with errors. Either return them as JSONRPCError or as {"error":...}, but not both. Also, the error approach should be documented.


    jonatack commented at 9:29 am on November 17, 2020:

    Yes, I plan to have a look at this later today. That’s the second part of my review feedback from #20282.

    In #20391 I proposed returning an error field rather than raising an RPC error for this type of errors but wasn’t sure which is preferred.


    MarcoFalke commented at 9:56 am on November 17, 2020:
    I think either is fine as long as it is documented and consistent. An RPCError makes sense when the return object would otherwise be empty and would have to omit a lot of optional fields, except for the error.

    jonatack commented at 1:00 pm on November 17, 2020:

    Proposing this:

    0$ ./src/bitcoin-cli -signet -rpcwallet="blank" upgradewallet 5
    1{
    2  "wallet_name": "blank",
    3  "previous_version": 169900,
    4  "current_version": 169900,
    5  "error": "Cannot downgrade wallet from version 169900 to version 5"
    6}
    

    jonatack commented at 1:02 pm on November 17, 2020:

    (currently that returns):

    0$ ./src/bitcoin-cli -signet -rpcwallet="blank" upgradewallet 5
    1error code: -4
    2error message:
    3Cannot downgrade wallet
    

    jonatack commented at 4:48 pm on November 17, 2020:
    Done

    jonatack commented at 4:51 pm on November 17, 2020:
    Let me know if there is anything needed WRT documenting the error approach.
  11. DrahtBot added the label Needs rebase on Nov 17, 2020
  12. MarcoFalke added the label Needs backport (0.21) on Nov 17, 2020
  13. jonatack force-pushed on Nov 17, 2020
  14. jonatack commented at 4:50 pm on November 17, 2020: member
    Rebased after the merge of #20139 and addressed #20403 (review) with 877aba836ec48bfa881ec0dd90299015a3c27cce.
  15. in src/wallet/rpcwallet.cpp:4500 in 877aba836e outdated
    4497+    obj.pushKV("previous_version", previous_version);
    4498+    obj.pushKV("current_version", version);
    4499+    if (!result.empty()) {
    4500+        obj.pushKV("result", result);
    4501+    }
    4502     if (!error.empty()) {
    


    MarcoFalke commented at 5:02 pm on November 17, 2020:
    0    else { CHECK_NONFATAL(!error.empty());
    

    jonatack commented at 6:43 pm on November 17, 2020:
    Thanks–done.
  16. in src/wallet/wallet.cpp:4125 in 877aba836e outdated
    4122     LOCK(cs_wallet);
    4123 
    4124     // Do not upgrade versions to any version between HD_SPLIT and FEATURE_PRE_SPLIT_KEYPOOL unless already supporting HD_SPLIT
    4125     if (!CanSupportFeature(FEATURE_HD_SPLIT) && version >= FEATURE_HD_SPLIT && version < FEATURE_PRE_SPLIT_KEYPOOL) {
    4126-        error = _("Cannot upgrade a non HD split wallet without upgrading to support pre split keypool. Please use version 169900 or no version specified.");
    4127+        error = strprintf(_("Cannot upgrade a non HD split wallet from version %i to version %i without upgrading to support pre-split keypool. Please use version %i or no version specified."),
    


    MarcoFalke commented at 5:04 pm on November 17, 2020:
    the translation shouldn’t be changed here, if you want this to be backported

    jonatack commented at 5:18 pm on November 17, 2020:

    Oh right (thanks!) and same for the translation just above as well, I suppose

    0-        error = _("Cannot downgrade wallet");
    1+        error = strprintf(_("Cannot downgrade wallet from version %i to version %i. Wallet version unchanged."), prev_version, version);
    

    MarcoFalke commented at 5:55 pm on November 17, 2020:
    If you like the translation changes, you can put them into a separate commit and write “not for backport” in the commit body

    jonatack commented at 7:19 pm on November 17, 2020:
    Done, thanks

    jonatack commented at 8:13 am on November 18, 2020:
    Thought: do translated strings need to be static? I should look at the implementation.

    MarcoFalke commented at 8:15 am on November 18, 2020:
    They can only be literals, but may include format specifiers
  17. DrahtBot removed the label Needs rebase on Nov 17, 2020
  18. jonatack force-pushed on Nov 17, 2020
  19. in test/functional/wallet_upgradewallet.py:174 in 84efee1aa6 outdated
    177-        assert_equal(wallet.upgradewallet(), {})
    178-        new_version = wallet.getwalletinfo()["walletversion"]
    179-        # upgraded wallet version should be greater than older one
    180-        assert_greater_than(new_version, old_version)
    181+        self.log.info("Test upgradewallet without version arguments")
    182+        self.test_upgradewallet(wallet, previous_version=159900, requested_version=169900)
    


    MarcoFalke commented at 8:09 am on November 18, 2020:
    This is not testing what the log claims to test

    jonatack commented at 8:12 am on November 18, 2020:
    Good catch

    jonatack commented at 12:46 pm on November 18, 2020:
    Fixed
  20. MarcoFalke added this to the milestone 0.21.0 on Nov 18, 2020
  21. jonatack force-pushed on Nov 18, 2020
  22. jonatack commented at 12:49 pm on November 18, 2020: member

    Found an edge case bug in the first commit, “wallet: enable CWallet::UpgradeWallet to return updated version”, and the fix led to a simpler implementation.

    Fixed two tests in the third commit, “wallet: fix and improve upgradewallet result responses”; thanks @MarcoFalke for catching one of them. The other one led to seeing the edge case bug.

    Re-verified build and the wallet_upgradewallet.py test at each commit.

     0jon@purity:~/projects/bitcoin/bitcoin (upgradewallet-improvements)$ git diff dfec0a8 25909e6
     1diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
     2index 17631c58e7..10a7a07ee7 100644
     3--- a/src/wallet/wallet.cpp
     4+++ b/src/wallet/wallet.cpp
     5@@ -4127,15 +4127,15 @@ bool CWallet::UpgradeWallet(int& version, bilingual_str& error)
     6     }
     7 
     8     // Permanently upgrade to the version
     9-    const WalletFeature new_version{GetClosestWalletFeature(version)};
    10-    SetMinVersion(new_version);
    11-    version = new_version; // return actual updated version
    12+    SetMinVersion(GetClosestWalletFeature(version));
    13 
    14     for (auto spk_man : GetActiveScriptPubKeyMans()) {
    15         if (!spk_man->Upgrade(prev_version, version, error)) {
    16             return false;
    17         }
    18     }
    19+
    20+    version = GetVersion(); // return actual updated version
    21     return true;
    22 }
    23 
    24diff --git a/test/functional/wallet_upgradewallet.py b/test/functional/wallet_upgradewallet.py
    25index cec3dd2b6d..7cae913fa1 100755
    26--- a/test/functional/wallet_upgradewallet.py
    27+++ b/test/functional/wallet_upgradewallet.py
    28@@ -90,10 +90,10 @@ class UpgradeWalletTest(BitcoinTestFramework):
    29             v16_3_node.submitblock(b)
    30         assert_equal(v16_3_node.getblockcount(), to_height)
    31 
    32-    def test_upgradewallet(self, wallet, previous_version, requested_version, unchanged=False):
    33-        new_version = previous_version if unchanged else requested_version
    34+    def test_upgradewallet(self, wallet, previous_version, requested_version, expected_version=None, no_arg=False, unchanged=False):
    35+        new_version = previous_version if unchanged else expected_version if expected_version else requested_version
    36         assert_equal(wallet.getwalletinfo()["walletversion"], previous_version)
    37-        assert_equal(wallet.upgradewallet(requested_version),
    38+        assert_equal(wallet.upgradewallet() if no_arg else wallet.upgradewallet(requested_version),
    39             {
    40                 "wallet_name": "",
    41                 "previous_version": previous_version,
    42@@ -182,7 +182,7 @@ class UpgradeWalletTest(BitcoinTestFramework):
    43         copy_v16()
    44         wallet = node_master.get_wallet_rpc(self.default_wallet_name)
    45         self.log.info("Test upgradewallet without version arguments")
    46-        self.test_upgradewallet(wallet, previous_version=159900, requested_version=169900)
    47+        self.test_upgradewallet(wallet, previous_version=159900, requested_version=169900, no_arg=True)
    48         # wallet should still contain the same balance
    49         assert_equal(wallet.getbalance(), v16_3_balance)
    50 
    51@@ -342,7 +342,7 @@ class UpgradeWalletTest(BitcoinTestFramework):
    52         old_kvs = dump_bdb_kv(node_master_wallet)
    53         defaultkey = old_kvs[b'\x0adefaultkey']
    54         self.log.info("Upgrade the wallet. Should still have the same default key.")
    55-        self.test_upgradewallet(wallet, previous_version=139900, requested_version=169900)
    56+        self.test_upgradewallet(wallet, previous_version=139900, requested_version=159900, expected_version=169900)
    57         new_kvs = dump_bdb_kv(node_master_wallet)
    58         up_defaultkey = new_kvs[b'\x0adefaultkey']
    59         assert_equal(defaultkey, up_defaultkey)
    
  23. in test/functional/wallet_upgradewallet.py:345 in 25909e6701 outdated
    340@@ -333,14 +341,15 @@ def copy_split_hd():
    341         # Check the wallet has a default key initially
    342         old_kvs = dump_bdb_kv(node_master_wallet)
    343         defaultkey = old_kvs[b'\x0adefaultkey']
    344-        # Upgrade the wallet. Should still have the same default key
    345-        wallet.upgradewallet(159900)
    346+        self.log.info("Upgrade the wallet. Should still have the same default key.")
    347+        self.test_upgradewallet(wallet, previous_version=139900, requested_version=159900, expected_version=169900)
    


    jonatack commented at 12:54 pm on November 18, 2020:
    @achow101 sanity check, if current version is 139900 FEATURE_HD, and upgradewallet 159900 FEATURE_NO_DEFAULT_KEY is called, is the wallet actually upgrading to 169900 FEATURE_PRE_SPLIT_KEYPOOL/FEATURE_LATEST the expected behavior ?

    achow101 commented at 4:18 pm on November 18, 2020:

    Versions less than FEATURE_HD_SPLIT cannot upgrade to FEATURE_HD_SPLIT or FEATURE_NO_DEFAULT_KEY. They must upgrade to FEATURE_PRE_SPLIT_KEYPOOL at which time both the previous features will also be applied.

    If a user specifies FEATURE_NO_DEFAULT_KEY on FEATURE_HD wallet, we should probably give an error and tell the user they can’t do that.

    Edit: This test is FEATURE_HD_SPLIT, not FEATURE_HD. I’m not sure why it jumps to FEATURE_LATEST.


    achow101 commented at 6:11 pm on November 18, 2020:

    Found it. Here’s a fix.

     0diff --git a/src/wallet/scriptpubkeyman.cpp b/src/wallet/scriptpubkeyman.cpp
     1index d2e1be6402..7dbbf17302 100644
     2--- a/src/wallet/scriptpubkeyman.cpp
     3+++ b/src/wallet/scriptpubkeyman.cpp
     4@@ -453,7 +453,7 @@ bool LegacyScriptPubKeyMan::Upgrade(int prev_version, int new_version, bilingual
     5         hd_upgrade = true;
     6     }
     7     // Upgrade to HD chain split if necessary
     8-    if (IsFeatureSupported(new_version, FEATURE_HD_SPLIT)) {
     9+    if (!IsFeatureSupported(prev_version, FEATURE_HD_SPLIT) && IsFeatureSupported(new_version, FEATURE_HD_SPLIT)) {
    10         WalletLogPrintf("Upgrading wallet to use HD chain split\n");
    11         m_storage.SetMinVersion(FEATURE_PRE_SPLIT_KEYPOOL);
    12         split_upgrade = FEATURE_HD_SPLIT > prev_version;
    13diff --git a/test/functional/wallet_upgradewallet.py b/test/functional/wallet_upgradewallet.py
    14index 7cae913fa1..fdd52ba574 100755
    15--- a/test/functional/wallet_upgradewallet.py
    16+++ b/test/functional/wallet_upgradewallet.py
    17@@ -342,7 +342,7 @@ class UpgradeWalletTest(BitcoinTestFramework):
    18         old_kvs = dump_bdb_kv(node_master_wallet)
    19         defaultkey = old_kvs[b'\x0adefaultkey']
    20         self.log.info("Upgrade the wallet. Should still have the same default key.")
    21-        self.test_upgradewallet(wallet, previous_version=139900, requested_version=159900, expected_version=169900)
    22+        self.test_upgradewallet(wallet, previous_version=139900, requested_version=159900, expected_version=159900)
    23         new_kvs = dump_bdb_kv(node_master_wallet)
    24         up_defaultkey = new_kvs[b'\x0adefaultkey']
    25         assert_equal(defaultkey, up_defaultkey)
    

    This particular change probably needs backport to 0.21, so I’ll make a separate PR for it.

  24. in src/wallet/wallet.cpp:4137 in 2310fe9685 outdated
    4132@@ -4133,6 +4133,8 @@ bool CWallet::UpgradeWallet(int version, bilingual_str& error)
    4133             return false;
    4134         }
    4135     }
    4136+
    4137+    version = GetVersion(); // return actual updated version
    


    MarcoFalke commented at 2:46 pm on November 18, 2020:
    in commit 2310fe9685246b0d505495ee98d38c82a1730293: would be a smaller diff and less complexity if this was moved to the caller, no?

    jonatack commented at 2:55 pm on November 18, 2020:

    Yes, I tried removing the first commit and just calling GetVersion() in RPCHelpMan upgradewallet() but the last test failed.

    Lines 345, 96 AssertionError: not({‘wallet_name’: ‘’, ‘previous_version’: 139900, ‘current_version’: 169900, ‘result’: ‘Wallet upgraded successfully from version 139900 to version 159900.’} == {‘wallet_name’: ‘’, ‘previous_version’: 139900, ‘current_version’: 159900, ‘result’: ‘Wallet upgraded successfully from version 139900 to version 159900.’})


    jonatack commented at 3:02 pm on November 18, 2020:
    Hm, will try again.

    jonatack commented at 3:14 pm on November 18, 2020:
    I didn’t update one of the version variables the first time. Seems good.
  25. wallet: refactor GetClosestWalletFeature() c46c18b788
  26. jonatack force-pushed on Nov 18, 2020
  27. jonatack commented at 3:27 pm on November 18, 2020: member
    Dropped the first commit to call GetVersion() in RPCHelpMan upgradewallet().
  28. achow101 referenced this in commit 6e213cbd17 on Nov 18, 2020
  29. achow101 referenced this in commit ecc6458b5a on Nov 18, 2020
  30. Don't upgrade to HD split if it is already supported
    It is unnecessary to upgrade to FEATURE_HD_SPLIT if this feature is
    already supported by the wallet. Because upgrading to FEATURE_HD_SPLIT
    actually requires upgrading to FEATURE_PRE_SPLIT_KEYPOOL, users would
    accidentally be upgraded to FEATURE_PRE_SPLIT_KEYPOOL instead of nothing
    being done.
    
    Fixes the issue described at
    https://github.com/bitcoin/bitcoin/pull/20403#discussion_r526063920
    2498b04ce8
  31. jonatack force-pushed on Nov 19, 2020
  32. jonatack commented at 8:08 am on November 19, 2020: member
    Pulled in #20420.
  33. in test/functional/wallet_upgradewallet.py:196 in 4dc34408bf outdated
    209         node_master.loadwallet('')
    210-        # Can "upgrade" to 129999 which should have no effect on the wallet
    211-        wallet.upgradewallet(129999)
    212-        assert_equal(60000, wallet.getwalletinfo()['walletversion'])
    213+        # Test an "upgrade" from 60000 to 129999 has no effect, as next version is 130000
    214+        self.test_upgradewallet(wallet, previous_version=60000, requested_version=129900, expected_version=60000)
    


    achow101 commented at 5:42 pm on November 19, 2020:

    In commit 4dc34408bfe8fa1c229d99a3d0d03a42c83ced69 “wallet: fix and improve upgradewallet result responses”

    requested_version should be 129999, not 129900


    jonatack commented at 7:03 pm on November 19, 2020:
    Good catch, thanks. Done.
  34. in test/functional/wallet_upgradewallet.py:346 in 4dc34408bf outdated
    331@@ -333,8 +332,8 @@ def copy_split_hd():
    332         # Check the wallet has a default key initially
    333         old_kvs = dump_bdb_kv(node_master_wallet)
    334         defaultkey = old_kvs[b'\x0adefaultkey']
    335-        # Upgrade the wallet. Should still have the same default key
    336-        wallet.upgradewallet(159900)
    337+        self.log.info("Upgrade the wallet. Should still have the same default key.")
    338+        self.test_upgradewallet(wallet, previous_version=139900, requested_version=159900)
    


    achow101 commented at 5:45 pm on November 19, 2020:

    In commit 4dc34408bfe8fa1c229d99a3d0d03a42c83ced69 “wallet: fix and improve upgradewallet result responses”

    The assert_equal(wallet.getwalletinfo()["walletversion"], 159900) below can be removed now.


    jonatack commented at 7:04 pm on November 19, 2020:
    Thanks for confirming that. Done.
  35. wallet: fix and improve upgradewallet result responses 99d56e3571
  36. wallet: fix and improve upgradewallet error responses ca8cd893bb
  37. wallet (not for backport): improve upgradewallet error messages 3eb6f8b2e6
  38. jonatack force-pushed on Nov 19, 2020
  39. achow101 commented at 7:05 pm on November 19, 2020: member
    ACK 3eb6f8b
  40. in src/wallet/rpcwallet.cpp:4217 in 3eb6f8b2e6
    4213@@ -4214,7 +4214,7 @@ static RPCHelpMan sethdseed()
    4214 
    4215     // Do not do anything to non-HD wallets
    4216     if (!pwallet->CanSupportFeature(FEATURE_HD)) {
    4217-        throw JSONRPCError(RPC_WALLET_ERROR, "Cannot set a HD seed on a non-HD wallet. Use the upgradewallet RPC in order to upgrade a non-HD wallet to HD");
    4218+        throw JSONRPCError(RPC_WALLET_ERROR, "Cannot set an HD seed on a non-HD wallet. Use the upgradewallet RPC in order to upgrade a non-HD wallet to HD");
    


    luke-jr commented at 11:17 pm on November 24, 2020:
    “a” is correct…

  41. in test/functional/wallet_upgradewallet.py:93 in 3eb6f8b2e6
    89@@ -92,6 +90,32 @@ def dumb_sync_blocks(self):
    90             v16_3_node.submitblock(b)
    91         assert_equal(v16_3_node.getblockcount(), to_height)
    92 
    93+    def test_upgradewallet(self, wallet, previous_version, requested_version=None, expected_version=None):
    


    MarcoFalke commented at 11:36 am on November 25, 2020:

    nit 99d56e357159c7154f69f28cb5587c5ca20d6594:

    0    def test_upgradewallet(self, wallet, *, previous_version, requested_version, expected_version=None):
    

    Could force named args and pass requested_version in all cases for clarity. Only one call needs to be adjusted, I think.


    jonatack commented at 12:22 pm on November 25, 2020:

    nit 99d56e3:

    Could force named args and pass requested_version in all cases for clarity. Only one call needs to be adjusted, I think.

    Thanks! Good idea.


    jonatack commented at 5:32 pm on November 27, 2020:
    Done in e915a2a2c87dad5beb68a175b21a07136bcc21ca
  42. in src/wallet/rpcwallet.cpp:4502 in 3eb6f8b2e6
    4500+    obj.pushKV("previous_version", previous_version);
    4501+    obj.pushKV("current_version", current_version);
    4502+    if (!result.empty()) {
    4503+        obj.pushKV("result", result);
    4504+    } else {
    4505+        CHECK_NONFATAL(!error.empty());
    


    MarcoFalke commented at 11:44 am on November 25, 2020:

    style nit ca8cd893bb56bf5d455154b0498b1f58f77d20ed:

    This should check (before the if) that there is either an error or a result, but not both.

    0
    1CHECK_NONFATAL(error.empty != result.empty());
    

    jonatack commented at 12:24 pm on November 25, 2020:

    style nit ca8cd89:

    This should check (before the if) that there is either an error or a result, but not both.

    Good idea, that would be better.


    jonatack commented at 5:32 pm on November 27, 2020:
    Done in e915a2a2c87dad5beb68a175b21a07136bcc21ca
  43. MarcoFalke approved
  44. MarcoFalke commented at 11:46 am on November 25, 2020: member

    review ACK 3eb6f8b2e61c24a22ea9396d86672307845f35eb 🛡

    Signature:

     0-----BEGIN PGP SIGNED MESSAGE-----
     1Hash: SHA512
     2
     3review ACK 3eb6f8b2e61c24a22ea9396d86672307845f35eb 🛡
     4-----BEGIN PGP SIGNATURE-----
     5
     6iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
     7pUin9Av/YujicGdR4qxlxmUVaSijOicvW7fTqB6MnQH6+MJnzn5mApTxTVF4ZLZj
     8nrHGzoEVTcnok6tsDS62eGJvmuP/FxXDZExtb/DrjMdcXqjdP4kpH67tMGAnyrnw
     9V/M5psoZxs/u0qm4zFa08ni6OBaeSA3U8bZ5Qj6Uk1P9of3VblGEjlw8wa3P/JU0
    1071s8J3wcyfXY+GS5iQ1DIbz4SgP7Ch7wLPQtgvetEPRblTvhoAgueZeURmgwHai9
    11ZIf1T9DpMkkBuJiZM+BhygbYF5J3r7vD0hcT/rrp3XNHpLuuMK0/ijaoJk2VXC44
    12/pnjQNbNXW01NH2PiamTY84rdXJW6qt7NJQtuIeOm2jivvo+Av+DOboOR5KRURUW
    13m4Ux1i6VaJ1Hov34Sqcnm4zy+WEq2/Lkpl5viwSOqctm7Yak/R38X5wYAx8PmsLP
    14S8/HSAS4aZob64D/Kkakod5VG1xl9fFw7aUQVioBGQ17hQ3PBYyXnBaIfaOiMXyR
    15RaovSwTo
    16=l1/v
    17-----END PGP SIGNATURE-----
    

    Timestamp of file with hash 1140e347b1496cc50a43fa6fca8080f5ac91dbec5a7d8191668b108f5c1bf70d -

  45. MarcoFalke merged this on Nov 25, 2020
  46. MarcoFalke closed this on Nov 25, 2020

  47. MarcoFalke removed the label Needs backport (0.21) on Nov 25, 2020
  48. MarcoFalke commented at 11:53 am on November 25, 2020: member
    Backported in #20490
  49. sidhujag referenced this in commit b91d3bb3db on Nov 25, 2020
  50. jonatack deleted the branch on Nov 25, 2020
  51. MarcoFalke referenced this in commit 9facca3ce0 on Nov 25, 2020
  52. janus referenced this in commit caa5069d34 on Dec 13, 2020
  53. apoelstra referenced this in commit 9b24f6aa60 on Sep 1, 2021
  54. apoelstra referenced this in commit e8ccd5fffe on Sep 18, 2021
  55. apoelstra referenced this in commit 92251542e5 on Sep 22, 2021
  56. MarcoFalke locked this on Feb 15, 2022

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: 2024-12-18 12:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me