tests/txb: fix bad BIP66 encoding (R = 0)
This commit is contained in:
parent
6c4977983d
commit
a463c41fb0
1 changed files with 2 additions and 2 deletions
|
@ -298,7 +298,7 @@ describe('TransactionBuilder', function () {
|
||||||
it('supports the alternative abstract interface { publicKey, sign }', function () {
|
it('supports the alternative abstract interface { publicKey, sign }', function () {
|
||||||
var keyPair = {
|
var keyPair = {
|
||||||
publicKey: Buffer.alloc(33, 0x03),
|
publicKey: Buffer.alloc(33, 0x03),
|
||||||
sign: function (hash) { return Buffer.alloc(64) }
|
sign: function (hash) { return Buffer.alloc(64, 0x5f) }
|
||||||
}
|
}
|
||||||
|
|
||||||
var txb = new TransactionBuilder()
|
var txb = new TransactionBuilder()
|
||||||
|
@ -306,7 +306,7 @@ describe('TransactionBuilder', function () {
|
||||||
txb.addInput('ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', 1)
|
txb.addInput('ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', 1)
|
||||||
txb.addOutput('1111111111111111111114oLvT2', 100000)
|
txb.addOutput('1111111111111111111114oLvT2', 100000)
|
||||||
txb.sign(0, keyPair)
|
txb.sign(0, keyPair)
|
||||||
assert.equal(txb.build().toHex(), '0100000001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff010000002c0930060201000201000121030303030303030303030303030303030303030303030303030303030303030303ffffffff01a0860100000000001976a914000000000000000000000000000000000000000088ac00000000')
|
assert.equal(txb.build().toHex(), '0100000001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff010000006a47304402205f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f02205f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f0121030303030303030303030303030303030303030303030303030303030303030303ffffffff01a0860100000000001976a914000000000000000000000000000000000000000088ac00000000')
|
||||||
})
|
})
|
||||||
|
|
||||||
fixtures.invalid.sign.forEach(function (f) {
|
fixtures.invalid.sign.forEach(function (f) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue