You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge bitcoin#19501: send* RPCs in the wallet returns the "fee reason"
69cf5d4 [test] Make sure send rpc returns fee reason (Sishir Giri)
d5863c0 [send] Make send RPCs return fee reason (Sishir Giri)
Pull request description:
Whenever a wallet funds a transaction, the fee reason is reported to the user only if the verbose is set to true. I added an extra parameter to `CreateTransaction` function in wallet.cpp. Then I implemented the fee reason return logic in `SendMoney` in rpcwallet.cpp, followed by verbose parameter in `sendtoaddress` and `sendmany` functions. I also added a fee reason test case in walletbasic.py.
link to the issue: maflcko#22 (comment)
ACKs for top commit:
instagibbs:
ACK bitcoin@69cf5d4
meshcollider:
utACK 69cf5d4
Tree-SHA512: 2e3af32dcfbd5511ba95f8bc8edca7acfe709a8430ff03e43172e5d0af3dfa4b2f57906978e7f272d878043b9ed8c6004674cf47d7496b005d5f612e9a58aa0e
{"avoid_reuse", RPCArg::Type::BOOL, /* default */"true", "(only available if avoid_reuse wallet flag is set) Avoid spending from dirty addresses; addresses are considered\n"
440
447
" dirty if they have previously been used in a transaction."},
448
+
{"verbose", RPCArg::Type::BOOL, /* default */"false", "If true, return extra information about the transaction."},
441
449
},
442
-
RPCResult{
443
-
RPCResult::Type::STR_HEX, "txid", "The transaction id."
450
+
{
451
+
RPCResult{"if verbose is not set or set to false",
452
+
RPCResult::Type::STR_HEX, "txid", "The transaction id."
453
+
},
454
+
RPCResult{"if verbose is set to true",
455
+
RPCResult::Type::OBJ, "", "",
456
+
{
457
+
{RPCResult::Type::STR_HEX, "txid", "The transaction id."},
458
+
{RPCResult::Type::STR, "fee reason", "The transaction fee reason."}
0 commit comments