rpc: add blockindex to getaddressdeltas method
for the purposes of secondary sorting by block order
This commit is contained in:
parent
3c74fff552
commit
1c022b9fc2
@ -177,6 +177,7 @@ class AddressIndexTest(BitcoinTestFramework):
|
||||
balance3 += delta["satoshis"]
|
||||
assert_equal(balance3, change_amount)
|
||||
assert_equal(deltas[0]["address"], address2)
|
||||
assert_equal(deltas[0]["blockindex"], 1)
|
||||
|
||||
# Check that entire range will be queried
|
||||
deltasAll = self.nodes[1].getaddressdeltas({"addresses": [address2]})
|
||||
|
@ -672,6 +672,7 @@ UniValue getaddressdeltas(const UniValue& params, bool fHelp)
|
||||
delta.push_back(Pair("satoshis", it->second));
|
||||
delta.push_back(Pair("txid", it->first.txhash.GetHex()));
|
||||
delta.push_back(Pair("index", (int)it->first.index));
|
||||
delta.push_back(Pair("blockindex", (int)it->first.txindex));
|
||||
delta.push_back(Pair("height", it->first.blockHeight));
|
||||
delta.push_back(Pair("address", address));
|
||||
result.push_back(delta);
|
||||
|
Loading…
Reference in New Issue
Block a user