aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpc/transactions.cpp
diff options
context:
space:
mode:
authorAndrew Chow <github@achow101.com>2022-10-27 13:08:40 -0400
committerAndrew Chow <github@achow101.com>2022-10-27 13:17:39 -0400
commit551c8e9526d2502f857e1ef6348c7f1380f37443 (patch)
treed3d94ab485a7265e304fdcc0c26e964475d1d09e /src/wallet/rpc/transactions.cpp
parentbd478890c513aafe2c65d4199c9f3c558670eaa3 (diff)
parenteb679a7896ce00e322972a011b023661766923b9 (diff)
downloadbitcoin-551c8e9526d2502f857e1ef6348c7f1380f37443.tar.xz
Merge bitcoin/bitcoin#26349: rpc: make `address` field optional `list{transactions, sinceblock}` response
eb679a7896ce00e322972a011b023661766923b9 rpc: make `address` field optional (w0xlt) Pull request description: Close https://github.com/bitcoin/bitcoin/issues/26338. This PR makes optional the `address` field in the response of `listtransactions` and `listsinceblock` RPC. And adds two tests that fail on master, but not on this branch. ACKs for top commit: achow101: ACK eb679a7896ce00e322972a011b023661766923b9 aureleoules: ACK eb679a7896ce00e322972a011b023661766923b9 Tree-SHA512: b267439626e2ec3134ae790c849949a4c40ef0cebd20092e8187be3db0a61941b2da10bbbba92ca880b8369f46c1aaa806d057eaa5159325f65cbec7cb33c52f
Diffstat (limited to 'src/wallet/rpc/transactions.cpp')
-rw-r--r--src/wallet/rpc/transactions.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/rpc/transactions.cpp b/src/wallet/rpc/transactions.cpp
index 0fe4ed703d..3c10b47082 100644
--- a/src/wallet/rpc/transactions.cpp
+++ b/src/wallet/rpc/transactions.cpp
@@ -447,7 +447,7 @@ RPCHelpMan listtransactions()
{RPCResult::Type::OBJ, "", "", Cat(Cat<std::vector<RPCResult>>(
{
{RPCResult::Type::BOOL, "involvesWatchonly", /*optional=*/true, "Only returns true if imported addresses were involved in transaction."},
- {RPCResult::Type::STR, "address", "The bitcoin address of the transaction."},
+ {RPCResult::Type::STR, "address", /*optional=*/true, "The bitcoin address of the transaction (not returned if the output does not have an address, e.g. OP_RETURN null data)."},
{RPCResult::Type::STR, "category", "The transaction category.\n"
"\"send\" Transactions sent.\n"
"\"receive\" Non-coinbase transactions received.\n"
@@ -561,7 +561,7 @@ RPCHelpMan listsinceblock()
{RPCResult::Type::OBJ, "", "", Cat(Cat<std::vector<RPCResult>>(
{
{RPCResult::Type::BOOL, "involvesWatchonly", /*optional=*/true, "Only returns true if imported addresses were involved in transaction."},
- {RPCResult::Type::STR, "address", "The bitcoin address of the transaction."},
+ {RPCResult::Type::STR, "address", /*optional=*/true, "The bitcoin address of the transaction (not returned if the output does not have an address, e.g. OP_RETURN null data)."},
{RPCResult::Type::STR, "category", "The transaction category.\n"
"\"send\" Transactions sent.\n"
"\"receive\" Non-coinbase transactions received.\n"