ECPair/script_signature: switch to 64-byte RS buffers only
This commit is contained in:
parent
0d76f00917
commit
6c4977983d
7 changed files with 82 additions and 68 deletions
|
@ -715,9 +715,7 @@ TransactionBuilder.prototype.sign = function (vin, keyPair, redeemScript, hashTy
|
|||
input.prevOutType === scriptTypes.P2WSH
|
||||
)) throw new Error('BIP143 rejects uncompressed public keys in P2WPKH or P2WSH')
|
||||
|
||||
var signature = keyPair.sign(signatureHash)
|
||||
if (Buffer.isBuffer(signature)) signature = bscript.signature.fromRSBuffer(signature)
|
||||
|
||||
let signature = keyPair.sign(signatureHash)
|
||||
input.signatures[i] = bscript.signature.encode(signature, hashType)
|
||||
return true
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue