Skip to content

Commit

Permalink
mining: return witness_script instead of raw witness_commitment in GBT
Browse files Browse the repository at this point in the history
  • Loading branch information
roylee17 committed Feb 8, 2022
1 parent 81fbd9b commit 10d81eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mining/mining.go
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,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 {

Expand Down Expand Up @@ -902,7 +902,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
Expand Down

0 comments on commit 10d81eb

Please sign in to comment.