Changeset View
Changeset View
Standalone View
Standalone View
test/functional/rpc_fundrawtransaction.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (c) 2014-2016 The Bitcoin Core developers | # Copyright (c) 2014-2016 The Bitcoin Core developers | ||||
# Distributed under the MIT software license, see the accompanying | # Distributed under the MIT software license, see the accompanying | ||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | # file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
from test_framework.test_framework import BitcoinTestFramework | from test_framework.test_framework import BitcoinTestFramework | ||||
from test_framework.util import * | from test_framework.util import * | ||||
from test_framework.mininode import CTransaction, FromHex, COIN | from test_framework.mininode import CTransaction, FromHex | ||||
def get_unspent(listunspent, amount): | def get_unspent(listunspent, amount): | ||||
for utx in listunspent: | for utx in listunspent: | ||||
if utx['amount'] == amount: | if utx['amount'] == amount: | ||||
return utx | return utx | ||||
raise AssertionError( | raise AssertionError( | ||||
'Could not find unspent with amount={}'.format(amount)) | 'Could not find unspent with amount={}'.format(amount)) | ||||
▲ Show 20 Lines • Show All 759 Lines • Show Last 20 Lines |