From e31a4527b47f759f02e3bbb5ca6641bff5f3fded Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Tue, 15 Mar 2016 15:01:31 -0700 Subject: [PATCH] fix sighash v1. --- lib/bcoin/tx.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bcoin/tx.js b/lib/bcoin/tx.js index 05d3cd10..16c43e67 100644 --- a/lib/bcoin/tx.js +++ b/lib/bcoin/tx.js @@ -308,7 +308,7 @@ TX.prototype.signatureHashV1 = function signatureHashV1(index, prev, type) { && (type & 0x1f) !== constants.hashType.none) { hashSequence = new BufferWriter(); for (i = 0; i < this.inputs.length; i++) - p.writeU32(this.inputs[i].sequence); + hashSequence.writeU32(this.inputs[i].sequence); hashSequence = utils.dsha256(hashSequence.render()); } else { hashSequence = utils.slice(constants.zeroHash);