This change is motivated by external RBF clients like https://github.com/CardCoins/additive-rbf-batcher/. It saves the user a redundant re-looping of tx outputs, calling getaddressinfo
on each one, looking for the change output in order to adjust the fee.
The field "ischange"
only appears when gettransaction
is called on a wallet, and is either true
or not present at all. I chose not to include ischange: false
because it is confusing to see that on received transactions.
Example of the new field:
0 "vout": [
1 {
2 "value": 1.00000000,
3 "n": 0,
4 "scriptPubKey": {
5 "asm": "0 5483235e05c76273b3b50af62519738781aff021",
6 "desc": "addr(bcrt1q2jpjxhs9ca388va4ptmz2xtns7q6lupppkw7wu)#d42g84j6",
7 "hex": "00145483235e05c76273b3b50af62519738781aff021",
8 "address": "bcrt1q2jpjxhs9ca388va4ptmz2xtns7q6lupppkw7wu",
9 "type": "witness_v0_keyhash"
10 }
11 },
12 {
13 "value": 198.99859000,
14 "n": 1,
15 "scriptPubKey": {
16 "asm": "0 870ab1ab58632b05a417d5295f4038500e407592",
17 "desc": "addr(bcrt1qsu9tr26cvv4stfqh65547spc2q8yqavj7fnlju)#tgapemkv",
18 "hex": "0014870ab1ab58632b05a417d5295f4038500e407592",
19 "address": "bcrt1qsu9tr26cvv4stfqh65547spc2q8yqavj7fnlju",
20 "type": "witness_v0_keyhash"
21 },
22 "ischange": true
23 }
24 ]