mining: update GBT to return witness script #21

Merged
roylee17 merged 1 commit from roylee/lbcd-update-gbt-to-return-witness-script into master 2022-02-14 07:15:26 +01:00
Showing only changes of commit a9cc4e4c01 - Show all commits

View file

@ -868,7 +868,7 @@ mempoolLoop:
} }
// AddWitnessCommitment adds the witness commitment as an OP_RETURN outpout // AddWitnessCommitment adds the witness commitment as an OP_RETURN outpout
// within the coinbase tx. The raw commitment is returned. // within the coinbase tx. The witness script is returned.
func AddWitnessCommitment(coinbaseTx *btcutil.Tx, func AddWitnessCommitment(coinbaseTx *btcutil.Tx,
blockTxns []*btcutil.Tx) []byte { blockTxns []*btcutil.Tx) []byte {
@ -907,7 +907,7 @@ func AddWitnessCommitment(coinbaseTx *btcutil.Tx,
coinbaseTx.MsgTx().TxOut = append(coinbaseTx.MsgTx().TxOut, coinbaseTx.MsgTx().TxOut = append(coinbaseTx.MsgTx().TxOut,
commitmentOutput) commitmentOutput)
return witnessCommitment return witnessScript
} }
// UpdateBlockTime updates the timestamp in the header of the passed block to // UpdateBlockTime updates the timestamp in the header of the passed block to