ECSignature: further avoidance of assert
This commit is contained in:
parent
9d1c610c08
commit
64657eb81f
1 changed files with 1 additions and 1 deletions
|
@ -71,7 +71,7 @@ ECSignature.parseScriptSignature = function (buffer) {
|
|||
var hashType = buffer.readUInt8(buffer.length - 1)
|
||||
var hashTypeMod = hashType & ~0x80
|
||||
|
||||
assert(hashTypeMod > 0x00 && hashTypeMod < 0x04, 'Invalid hashType ' + hashType)
|
||||
if (hashTypeMod <= 0x00 || hashTypeMod >= 0x04) throw new Error('Invalid hashType ' + hashType)
|
||||
|
||||
return {
|
||||
signature: ECSignature.fromDER(buffer.slice(0, -1)),
|
||||
|
|
Loading…
Reference in a new issue