Create segwit signature hash with floData included :)

This commit is contained in:
Sky Young 2018-10-20 11:32:12 -06:00
parent 86dc7c601a
commit 36f88b398f

View File

@ -711,6 +711,15 @@ TX.prototype.signatureHashV1 = function signatureHashV1(index, prev, value, type
bw.writeU32(input.sequence);
bw.writeBytes(outputs);
bw.writeU32(this.locktime);
var fOmitTxComment = !!(type & hashType.OMIT_TX_COMMENT);
if (this.version >= 2 && !fOmitTxComment) {
bw.writeVarBytes(Buffer.from(this.strFloData));
}
type &= ~hashType.OMIT_TX_COMMENT;
bw.writeU32(type);
return digest.hash256(bw.render());