- rework the function to not log errors but use throw JSONRPCError
- remove a check for IsLocked() that is done in sendtoaddress and sendfrom RPC calls already
- cache GetBalance() return value, because it's possibly used twice
minor rework of SendMoney in rpcwallet #5694
pull Diapolo wants to merge 1 commits into bitcoin:master from Diapolo:sendmoney changing 1 files +11 −16-
Diapolo commented at 10:24 AM on January 23, 2015: none
-
in src/rpcwallet.cpp:None in 8d888dc1aa outdated
326 | - { 327 | - strError = "Error: Wallet locked, unable to create transaction!"; 328 | - LogPrintf("SendMoney() : %s", strError); 329 | - throw JSONRPCError(RPC_WALLET_ERROR, strError); 330 | - } 331 | -
jonasschnelli commented at 12:42 PM on January 23, 2015:Why did you remove this part?
Diapolo commented at 6:20 PM on January 24, 2015:See commit msg
remove a check for IsLocked() that is done in sendtoaddress and sendfrom RPC calls already.
TheBlueMatt commented at 8:37 PM on February 2, 2015:I'd generally prefer to keep double-checks like this.
laanwj added the label Wallet on Jan 26, 2015in src/rpcwallet.cpp:None in 8d888dc1aa outdated
310 | @@ -310,33 +311,27 @@ Value getaddressesbyaccount(const Array& params, bool fHelp) 311 | 312 | void SendMoney(const CTxDestination &address, CAmount nValue, CWalletTx& wtxNew)
laanwj commented at 10:27 AM on January 26, 2015:Let's make the function static too
Diapolo commented at 7:37 AM on January 27, 2015:Done, should be ready now!
laanwj commented at 10:28 AM on January 26, 2015: memberlooks good to me, utACK
jonasschnelli commented at 8:29 AM on January 29, 2015: contributorACK. Passes all tests (
sendtoaddressis heavily covered by tests and usesSendMoney()).fanquake commented at 10:21 AM on February 2, 2015: memberutACK
fanquake commented at 2:06 PM on February 4, 2015: memberNeeds rebase
25cf6f3d41minor rework of SendMoney in rpcwallet
- rework the function to not log errors but use throw JSONRPCError - remove a check for IsLocked() that is done in sendtoaddress and sendfrom RPC calls already - cache GetBalance() return value, because it's possibly used twice
sipa commented at 6:49 AM on February 14, 2015: memberutACK
Diapolo commented at 7:56 AM on February 26, 2015: nonePing
laanwj merged this on Feb 26, 2015laanwj closed this on Feb 26, 2015laanwj referenced this in commit db4a1d598c on Feb 26, 2015Diapolo deleted the branch on Feb 27, 2015MarcoFalke 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-21 15: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-21 15: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