From a9cc4e4c01e153eada365f1a52e6ec6fd6a31186 Mon Sep 17 00:00:00 2001 From: Roy Lee Date: Mon, 7 Feb 2022 23:18:14 -0800 Subject: [PATCH] mining: return witness_script instead of raw witness_commitment in GBT --- mining/mining.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mining/mining.go b/mining/mining.go index 6eb00316..4f3ac9e5 100644 --- a/mining/mining.go +++ b/mining/mining.go @@ -868,7 +868,7 @@ mempoolLoop: } // 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, blockTxns []*btcutil.Tx) []byte { @@ -907,7 +907,7 @@ func AddWitnessCommitment(coinbaseTx *btcutil.Tx, coinbaseTx.MsgTx().TxOut = append(coinbaseTx.MsgTx().TxOut, commitmentOutput) - return witnessCommitment + return witnessScript } // UpdateBlockTime updates the timestamp in the header of the passed block to