The helper get_witness_script
is already available in the blocktools
module of our test framework, i.e. there is no need to re-implement it in the signet miner script. Note that the cast from CScript to bytes is necessary for applying the +=
operator on the scriptPubKey later, which would fail for CScript:
0 File "/home/honeybadger/bitcoin/contrib/signet/miner", line 132, in signet_txs
1 txs[0].vout[-1].scriptPubKey += CScriptOp.encode_op_pushdata(SIGNET_HEADER)
2 File "/home/honeybadger/bitcoin/test/functional/test_framework/script.py", line 460, in __add__
3 raise NotImplementedError
4NotImplementedError