Skip to content

Commit a463c41

Browse files
committed
tests/txb: fix bad BIP66 encoding (R = 0)
1 parent 6c49779 commit a463c41

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/transaction_builder.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,15 +298,15 @@ describe('TransactionBuilder', function () {
298298
it('supports the alternative abstract interface { publicKey, sign }', function () {
299299
var keyPair = {
300300
publicKey: Buffer.alloc(33, 0x03),
301-
sign: function (hash) { return Buffer.alloc(64) }
301+
sign: function (hash) { return Buffer.alloc(64, 0x5f) }
302302
}
303303

304304
var txb = new TransactionBuilder()
305305
txb.setVersion(1)
306306
txb.addInput('ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', 1)
307307
txb.addOutput('1111111111111111111114oLvT2', 100000)
308308
txb.sign(0, keyPair)
309-
assert.equal(txb.build().toHex(), '0100000001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff010000002c0930060201000201000121030303030303030303030303030303030303030303030303030303030303030303ffffffff01a0860100000000001976a914000000000000000000000000000000000000000088ac00000000')
309+
assert.equal(txb.build().toHex(), '0100000001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff010000006a47304402205f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f02205f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f0121030303030303030303030303030303030303030303030303030303030303030303ffffffff01a0860100000000001976a914000000000000000000000000000000000000000088ac00000000')
310310
})
311311

312312
fixtures.invalid.sign.forEach(function (f) {

0 commit comments

Comments
 (0)