Merge pull request from bitcoinjs/bip66

Extract BIP66 module
This commit is contained in:
Daniel Cousens 2015-08-25 14:17:44 +10:00
commit ec1195bcee
6 changed files with 66 additions and 88 deletions

View file

@ -243,14 +243,12 @@ describe('Bitcoin-core', function () {
if (i % 2 !== 0) return
var description = sig_noncanonical[i - 1].slice(0, -1)
if (description === 'too long') return // we support non secp256k1 signatures
var buffer = new Buffer(hex, 'hex')
it('throws on ' + description, function () {
assert.throws(function () {
bitcoin.ECSignature.parseScriptSignature(buffer)
})
}, /Expected DER (integer|sequence)|(R|S) value (excessively padded|is negative)|(R|S|DER sequence) length is (zero|too short|too long|invalid)|Invalid hashType/)
})
})
})