Skip to content

Commit aac040b

Browse files
committed
signet/miner: drop create_coinbase function
1 parent 16951f5 commit aac040b

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

contrib/signet/miner

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,6 @@ SIGNET_HEADER = b"\xec\xc7\xda\xa2"
3232
PSBT_SIGNET_BLOCK = b"\xfc\x06signetb" # proprietary PSBT global field holding the block being signed
3333
RE_MULTIMINER = re.compile(r"^(\d+)(-(\d+))?/(\d+)$")
3434

35-
def create_coinbase(height, value, spk):
36-
cb = CTransaction()
37-
cb.vin = [CTxIn(COutPoint(0, 0xffffffff), script_BIP34_coinbase_height(height), 0xffffffff)]
38-
cb.vout = [CTxOut(value, spk)]
39-
return cb
40-
4135
def signet_txs(block, challenge):
4236
# assumes signet solution has not been added yet so does not need
4337
# to be removed
@@ -103,7 +97,9 @@ def generate_psbt(tmpl, reward_spk, *, blocktime=None):
10397
signet_spk = tmpl["signet_challenge"]
10498
signet_spk_bin = bytes.fromhex(signet_spk)
10599

106-
cbtx = create_coinbase(height=tmpl["height"], value=tmpl["coinbasevalue"], spk=reward_spk)
100+
cbtx = CTransaction()
101+
cbtx.vin = [CTxIn(COutPoint(0, 0xffffffff), script_BIP34_coinbase_height(tmpl["height"]), 0xffffffff)]
102+
cbtx.vout = [CTxOut(tmpl["coinbasevalue"], reward_spk)]
107103
cbtx.vin[0].nSequence = 2**32-2
108104
cbtx.rehash()
109105

0 commit comments

Comments
 (0)