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
4e362c2 doc: add release note for 25934 (brunoerg)
fe488b4 test: add coverage for `label` in `listsinceblock` (brunoerg)
722e9a4 wallet, rpc: add `label` to `listsinceblock` (brunoerg)
852891f refactor, wallet: use optional for `label` in `ListTransactions` (brunoerg)
Pull request description:
This PR adds `label` parameter to `listsinceblock` to be able to fetch all incoming transactions having the specified label since a specific block.
It's possible to use it in `listtransactions`, however, it's only possible to set the number of transactions to return, not a specific block to fetch from. `getreceivedbylabel` only returns the total amount received, not the txs info. `listreceivedbylabel` doesn't list all the informations about the transactions and it's not possible to fetch since a block.
ACKs for top commit:
achow101:
ACK 4e362c2
w0xlt:
ACK bitcoin/bitcoin@4e362c2
aureleoules:
ACK 4e362c2
Tree-SHA512: fbde5db8cebf7a27804154fa61997b5155ad512e978cebb78c17acab9efcb624ea5f39d649899d12e5e675f80d4d0064cae8132b864de0d93a8d1e6fbcb9a737
// the user could have gotten from another RPC command prior to now
486
486
pwallet->BlockUntilSyncedToCurrentChain();
487
487
488
-
conststd::string* filter_label = nullptr;
488
+
std::optional<std::string> filter_label;
489
489
if (!request.params[0].isNull() && request.params[0].get_str() != "*") {
490
-
filter_label = &request.params[0].get_str();
491
-
if (filter_label->empty()) {
490
+
filter_label = request.params[0].get_str();
491
+
if (filter_label.value().empty()) {
492
492
throwJSONRPCError(RPC_INVALID_PARAMETER, "Label argument must be a valid label name or \"*\".");
493
493
}
494
494
}
@@ -552,6 +552,7 @@ RPCHelpMan listsinceblock()
552
552
{"include_removed", RPCArg::Type::BOOL, RPCArg::Default{true}, "Show transactions that were removed due to a reorg in the \"removed\" array\n"
553
553
"(not guaranteed to work on pruned nodes)"},
554
554
{"include_change", RPCArg::Type::BOOL, RPCArg::Default{false}, "Also add entries for change outputs.\n"},
555
+
{"label", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, "Return only incoming transactions paying to addresses with the specified label.\n"},
0 commit comments