Skip to content

Commit df5e05c

Browse files
committed
ignore duplicate addresses in addrindex requests
1 parent 0499c42 commit df5e05c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

qa/rpc-tests/addressindex.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,17 +177,15 @@ def check_balance(node_index, address, expected_balance, expected_received=None)
177177
txFeePat = self.nodes[0].gettxfee(txid)["txFeePat"]
178178

179179
# the one tx in the mempool refers to addresses addr1 and addr2,
180-
# check that duplicate addresses are processed correctly
181-
# change by default goes back to the sender, so there will be one
180+
# change by default goes back to the sender, so there will be one
182181
# output to addr1 with a change (4 - 3 - txFee) and one output to addr2
183-
mempool1 = self.nodes[0].getaddressmempool({'addresses': [addr2, addr1, addr2]})
184-
assert_equal(len(mempool1), 4)
182+
mempool1 = self.nodes[0].getaddressmempool({'addresses': [addr2, addr1]})
183+
assert_equal(len(mempool1), 3)
185184

186185
expected_mempool_values1 = [
187186
{ 'address': addr2, 'patoshis': 3 * COIN},
188187
{ 'address': addr1, 'patoshis': [ -4 * COIN, (4 - 3) * COIN - txFeePat ] },
189188
{ 'address': addr1, 'patoshis': [ -4 * COIN, (4 - 3) * COIN - txFeePat ] },
190-
{ 'address': addr2, 'patoshis': 3 * COIN }
191189
]
192190

193191
for i, expected in enumerate(expected_mempool_values1):

0 commit comments

Comments
 (0)