Add a check for internal vs. external outputs to wallet_listreceived test.

This commit is contained in:
Kris Nuttycombe 2022-01-25 16:32:51 -07:00
parent 1733c6bc0c
commit 71f17fa05c
1 changed files with 4 additions and 0 deletions

View File

@ -42,10 +42,14 @@ class ListReceivedTest (BitcoinTestFramework):
# Decrypted transaction details should be correct
pt = self.nodes[1].z_viewtransaction(txid)
assert_equal(pt['txid'], txid)
assert_equal(len(pt['spends']), 0)
assert_equal(len(pt['outputs']), 1 if release == 'sprout' else 2)
# Expect one internal output and one external.
assert_equal(len([output for output in pt['outputs'] if output['outgoing']]), 1)
# Output orders can be randomized, so we check the output
# positions and contents separately
outputs = []