aboutsummaryrefslogtreecommitdiff
path: root/src/script/interpreter.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@protonmail.com>2021-03-15 19:46:59 +0100
committerWladimir J. van der Laan <laanwj@protonmail.com>2021-03-15 19:55:38 +0100
commitb650c9140e00830b49f93a482e8bbb89a198fa8e (patch)
tree50dcd0d82cb450dc2f70f39ccfa6d7180e592a05 /src/script/interpreter.h
parent67ec26cacff3c2cc4721aabccd85efebd9501ccc (diff)
parent06e1fb0b170a69996a7ce1ef5203785a7bc6b278 (diff)
downloadbitcoin-b650c9140e00830b49f93a482e8bbb89a198fa8e.tar.xz
Merge #21141: wallet: Add new format string placeholders for walletnotify
06e1fb0b170a69996a7ce1ef5203785a7bc6b278 Add new format string placeholders for walletnotify to include relevant block information for transactions (Maayan Keshet) Pull request description: This patch includes two new format placeholders for walletnotify: %b - the hash of the block containting the transaction (zeroed if a mempool transaction) %h - the height of the block containing the transaction (zero if a mempool transaction) I've included test suite changes to check and validate the above functional requirements as well as doc/help description changes. **Motivation** The walletnotify option is used to be notified of new transactions relevant to the wallet of the node. A common usage pattern is to perform afterwards additional RPC calls to determine: 1. If this is a mempool transaction or not (i.e. are there any confirmations?) 2. What block was it included in? 3. Did this transaction was seen before and is now seen again because of a fork? All of these questions can be answered with the current features, but the resulting RPC calls may be expensive in a heavily used node. As this information is readily available when calling the walletnotify callback, it makes sense to save expensive round trips by optionally sending this information at that point in time. I can definitely say we would like to use it in Fireblocks, my employer. Please let me know of any questions and suggestions. ACKs for top commit: laanwj: ACK 06e1fb0b170a69996a7ce1ef5203785a7bc6b278 Tree-SHA512: d2744e2a7a883f9c3a9fd32237110e048c4b6b11fea8221c33d10b74157f65bbc4351211f441e8c1a4af5d5d38e2ba6b1943a7673dc18860c0553d7b41e00775
Diffstat (limited to 'src/script/interpreter.h')
0 files changed, 0 insertions, 0 deletions