aboutsummaryrefslogtreecommitdiff
path: root/contrib/signet
diff options
context:
space:
mode:
authorZero-1729 <zero1729@protonmail.com>2021-08-16 19:30:44 +0100
committerZero-1729 <zero1729@protonmail.com>2021-08-16 19:30:56 +0100
commit021daedfa100defad553d69cd3d628aaa5bc7caf (patch)
treeaea7f9c78aa5e73073d26bfff3e2357986a8e056 /contrib/signet
parentf4328ebef52f51a5ee45cc42815c91ccd28b0669 (diff)
refactor: replace remaining binascii method calls
Diffstat (limited to 'contrib/signet')
-rwxr-xr-xcontrib/signet/miner5
1 files changed, 2 insertions, 3 deletions
diff --git a/contrib/signet/miner b/contrib/signet/miner
index 78e1fa5ecd..012bd6cc31 100755
--- a/contrib/signet/miner
+++ b/contrib/signet/miner
@@ -15,7 +15,6 @@ import sys
import time
import subprocess
-from binascii import unhexlify
from io import BytesIO
PATH_BASE_CONTRIB_SIGNET = os.path.abspath(os.path.dirname(os.path.realpath(__file__)))
@@ -202,7 +201,7 @@ def finish_block(block, signet_solution, grind_cmd):
def generate_psbt(tmpl, reward_spk, *, blocktime=None):
signet_spk = tmpl["signet_challenge"]
- signet_spk_bin = unhexlify(signet_spk)
+ signet_spk_bin = bytes.fromhex(signet_spk)
cbtx = create_coinbase(height=tmpl["height"], value=tmpl["coinbasevalue"], spk=reward_spk)
cbtx.vin[0].nSequence = 2**32-2
@@ -258,7 +257,7 @@ def get_reward_addr_spk(args, height):
return args.address, args.reward_spk
reward_addr = get_reward_address(args, height)
- reward_spk = unhexlify(json.loads(args.bcli("getaddressinfo", reward_addr))["scriptPubKey"])
+ reward_spk = bytes.fromhex(json.loads(args.bcli("getaddressinfo", reward_addr))["scriptPubKey"])
if args.address is not None:
# will always be the same, so cache
args.reward_spk = reward_spk