Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc_rpc_avalancheproof.py
Show First 20 Lines • Show All 381 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
if self.is_wallet_compiled(): | if self.is_wallet_compiled(): | ||||
check_rpc_failure(too_many_utxos, "too-many-utxos") | check_rpc_failure(too_many_utxos, "too-many-utxos") | ||||
conflicting_utxo = node.buildavalancheproof( | conflicting_utxo = node.buildavalancheproof( | ||||
proof_sequence + 1, proof_expiration, wif_privkey, stakes) | proof_sequence + 1, proof_expiration, wif_privkey, stakes) | ||||
assert_raises_rpc_error(-8, "The proof has conflicting utxo with an existing proof", | assert_raises_rpc_error(-8, "The proof has conflicting utxo with an existing proof", | ||||
node.sendavalancheproof, conflicting_utxo) | node.sendavalancheproof, conflicting_utxo) | ||||
# Clear the proof pool | |||||
self.restart_node(0) | |||||
# Good proof | # Good proof | ||||
assert node.verifyavalancheproof(proof) | assert node.verifyavalancheproof(proof) | ||||
peer = node.add_p2p_connection(P2PInterface()) | peer = node.add_p2p_connection(P2PInterface()) | ||||
proofid = FromHex(LegacyAvalancheProof(), proof).proofid | proofid = FromHex(LegacyAvalancheProof(), proof).proofid | ||||
node.sendavalancheproof(proof) | node.sendavalancheproof(proof) | ||||
assert proofid in get_proof_ids(node) | assert proofid in get_proof_ids(node) | ||||
▲ Show 20 Lines • Show All 136 Lines • Show Last 20 Lines |