aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/receivedby.py
diff options
context:
space:
mode:
Diffstat (limited to 'qa/rpc-tests/receivedby.py')
-rwxr-xr-xqa/rpc-tests/receivedby.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/qa/rpc-tests/receivedby.py b/qa/rpc-tests/receivedby.py
index 4f17b661cb..248bcdbd68 100755
--- a/qa/rpc-tests/receivedby.py
+++ b/qa/rpc-tests/receivedby.py
@@ -2,19 +2,16 @@
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-# Exercise the listreceivedbyaddress API
+"""Test the listreceivedbyaddress RPC."""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
-
def get_sub_array_from_array(object_array, to_match):
'''
Finds and returns a sub array from an array of arrays.
to_match should be a unique idetifier of a sub array
'''
- num_matched = 0
for item in object_array:
all_match = True
for key,value in to_match.items():
@@ -104,7 +101,7 @@ class ReceivedByTest(BitcoinTestFramework):
received_by_account_json = get_sub_array_from_array(self.nodes[1].listreceivedbyaccount(),{"account":account})
if len(received_by_account_json) == 0:
raise AssertionError("No accounts found in node")
- balance_by_account = rec_by_accountArr = self.nodes[1].getreceivedbyaccount(account)
+ balance_by_account = self.nodes[1].getreceivedbyaccount(account)
txid = self.nodes[0].sendtoaddress(addr, 0.1)
self.sync_all()