Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_framework/avatools.py
Show First 20 Lines • Show All 144 Lines • ▼ Show 20 Lines | for utxo in utxos[:count]: | ||||
'height': heights[blockhash], | 'height': heights[blockhash], | ||||
'privatekey': private_keys[utxo["address"]], | 'privatekey': private_keys[utxo["address"]], | ||||
}) | }) | ||||
return stakes | return stakes | ||||
def get_proof_ids(node): | def get_proof_ids(node): | ||||
return [int(node.decodeavalancheproof(peer['proof'])['proofid'], 16) | return [int(peer['proofid'], 16) for peer in node.getavalanchepeerinfo()] | ||||
for peer in node.getavalanchepeerinfo()] | |||||
def wait_for_proof(node, proofid_hex, timeout=60, expect_orphan=None): | def wait_for_proof(node, proofid_hex, timeout=60, expect_orphan=None): | ||||
""" | """ | ||||
Wait for the proof to be known by the node. If expect_orphan is set, the | Wait for the proof to be known by the node. If expect_orphan is set, the | ||||
proof should match the orphan state, otherwise it's a don't care parameter. | proof should match the orphan state, otherwise it's a don't care parameter. | ||||
""" | """ | ||||
def proof_found(): | def proof_found(): | ||||
▲ Show 20 Lines • Show All 221 Lines • Show Last 20 Lines |