diff --git a/test/functional/abc_p2p_proof_inventory.py b/test/functional/abc_p2p_proof_inventory.py --- a/test/functional/abc_p2p_proof_inventory.py +++ b/test/functional/abc_p2p_proof_inventory.py @@ -116,7 +116,7 @@ privkey = ECKey() privkey.generate() orphan_hex = node.buildavalancheproof( - 42, 2000000000, privkey.get_pubkey().get_bytes().hex(), [{ + 42, 2000000000, bytes_to_wif(privkey.get_bytes()), [{ 'txid': '0' * 64, 'vout': 0, 'amount': 10e6, diff --git a/test/functional/p2p_inv_download.py b/test/functional/p2p_inv_download.py --- a/test/functional/p2p_inv_download.py +++ b/test/functional/p2p_inv_download.py @@ -390,7 +390,7 @@ # Build a proof with missing utxos so it will be orphaned orphan = node.buildavalancheproof( - 42, 2000000000, privkey.get_pubkey().get_bytes().hex(), [{ + 42, 2000000000, bytes_to_wif(privkey.get_bytes()), [{ 'txid': '0' * 64, 'vout': 0, 'amount': 10e6, @@ -427,7 +427,7 @@ # Build an invalid proof (no stake) no_stake_hex = node.buildavalancheproof( - 42, 2000000000, privkey.get_pubkey().get_bytes().hex(), [] + 42, 2000000000, bytes_to_wif(privkey.get_bytes()), [] ) no_stake = FromHex(AvalancheProof(), no_stake_hex) assert_raises_rpc_error(-8, diff --git a/test/functional/test_framework/avatools.py b/test/functional/test_framework/avatools.py --- a/test/functional/test_framework/avatools.py +++ b/test/functional/test_framework/avatools.py @@ -32,6 +32,7 @@ satoshi_round, wait_until, ) +from .wallet_util import bytes_to_wif def create_coinbase_stakes( @@ -267,11 +268,10 @@ privkey = ECKey() privkey.generate() - pubkey = privkey.get_pubkey() stakes = create_coinbase_stakes( node, blockhashes, node.get_deterministic_priv_key().key) proof_hex = node.buildavalancheproof( - 42, 2000000000, pubkey.get_bytes().hex(), stakes) + 42, 2000000000, bytes_to_wif(privkey.get_bytes()), stakes) return privkey, FromHex(AvalancheProof(), proof_hex)