Fix resendwallettransactions assert failure if -walletbroadcast=0 #10995

pull TheBlueMatt wants to merge 1 commits into bitcoin:master from TheBlueMatt:2018-08-walletbroadcast-assert changing 3 files +8 −0
  1. TheBlueMatt commented at 5:49 pm on August 5, 2017: member
    This fixes #10981 in my preferred way.
  2. laanwj commented at 7:03 pm on August 5, 2017: member
    utACK
  3. laanwj added this to the milestone 0.15.0 on Aug 5, 2017
  4. laanwj added the label Wallet on Aug 5, 2017
  5. sipa commented at 8:07 pm on August 5, 2017: member
    utACK 48ff1822a007195640299f728d75b52e6d4a22a6
  6. promag commented at 9:54 pm on August 6, 2017: member
    Even though resendwallettransactions is for testing purpose, having an empty response indicates that there are no unconfirmed transactions, which can be incorrect. IMO it should return an error like, for instance, RPC_INVALID_REQUEST.
  7. TheBlueMatt commented at 0:15 am on August 7, 2017: member
    @promag seems reasonable, I added a commit to do so.
  8. in src/wallet/rpcwallet.cpp:2601 in b42d651e18 outdated
    2597@@ -2597,6 +2598,9 @@ UniValue resendwallettransactions(const JSONRPCRequest& request)
    2598 
    2599     LOCK2(cs_main, pwallet->cs_wallet);
    2600 
    2601+    if (pwallet->GetBroadcastTransactions())
    


    promag commented at 0:26 am on August 7, 2017:
    Nit, curly braces.
  9. in src/wallet/wallet.cpp:1871 in b42d651e18 outdated
    1867@@ -1868,6 +1868,8 @@ std::vector<uint256> CWallet::ResendWalletTransactionsBefore(int64_t nTime, CCon
    1868     std::vector<uint256> result;
    1869 
    1870     LOCK(cs_wallet);
    1871+    if (!fBroadcastTransactions) return result;
    


    promag commented at 0:27 am on August 7, 2017:
    Remove and let it hit assert.
  10. in src/wallet/rpcwallet.cpp:2592 in b42d651e18 outdated
    2588@@ -2589,6 +2589,7 @@ UniValue resendwallettransactions(const JSONRPCRequest& request)
    2589             "Immediately re-broadcast unconfirmed wallet transactions to all peers.\n"
    2590             "Intended only for testing; the wallet code periodically re-broadcasts\n"
    2591             "automatically.\n"
    2592+            "Returns an RPC error if -walletbroadcast is set to false.\n"
    


    promag commented at 0:29 am on August 7, 2017:
    In the help you reference the app arg, but not in the error message. Make them consistent?
  11. promag commented at 0:30 am on August 7, 2017: member
    Concept ACK modulus comments.
  12. Fix resendwallettransactions assert failure if -walletbroadcast=0 01699fb283
  13. TheBlueMatt commented at 1:41 am on August 7, 2017: member
    Fixed issues and squashed.
  14. TheBlueMatt force-pushed on Aug 7, 2017
  15. laanwj merged this on Aug 7, 2017
  16. laanwj closed this on Aug 7, 2017

  17. laanwj referenced this in commit fa64636948 on Aug 7, 2017
  18. dougstrong77 commented at 2:50 pm on August 7, 2017: none
    Plz send me some where to learn this im confused and screwing up everything
  19. jnewbery commented at 7:53 pm on August 7, 2017: member
    Post-merge comment: application-level errors should not use RPC_INVALID_REQUEST. Fixed in #11002.
  20. laanwj referenced this in commit 4268426b45 on Aug 8, 2017
  21. MarcoFalke referenced this in commit ac016e17d2 on Aug 12, 2017
  22. PastaPastaPasta referenced this in commit 33807c8cee on Aug 2, 2019
  23. UdjinM6 referenced this in commit 95fac106f6 on Aug 4, 2019
  24. UdjinM6 referenced this in commit da63a2deac on Aug 4, 2019
  25. PastaPastaPasta referenced this in commit a7ef222617 on Aug 5, 2019
  26. PastaPastaPasta referenced this in commit f1f9e5dfb5 on Aug 5, 2019
  27. PastaPastaPasta referenced this in commit bb45e2df66 on Aug 6, 2019
  28. PastaPastaPasta referenced this in commit 6a12a4dd6e on Aug 6, 2019
  29. PastaPastaPasta referenced this in commit 44dc84e69a on Aug 6, 2019
  30. PastaPastaPasta referenced this in commit 34c89f5a63 on Aug 6, 2019
  31. PastaPastaPasta referenced this in commit b0aef55115 on Aug 6, 2019
  32. barrystyle referenced this in commit 18103aa09c on Jan 22, 2020
  33. barrystyle referenced this in commit 7835df3b01 on Jan 22, 2020
  34. barrystyle referenced this in commit 0b532c71fb on Jan 22, 2020
  35. DrahtBot locked this on Sep 8, 2021

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

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