Skip to content

Commit 152eed5

Browse files
committed
templates/pubkey: only canonical pubkeys to encode
1 parent 3ba17a1 commit 152eed5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/templates/pubkey/input.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// {signature}
22

33
var bscript = require('../../script')
4-
var types = require('../../types')
54
var typeforce = require('typeforce')
65

76
function check (script) {
@@ -13,7 +12,7 @@ function check (script) {
1312
check.toJSON = function () { return 'pubKey input' }
1413

1514
function encodeStack (signature) {
16-
typeforce(types.Buffer, signature)
15+
typeforce(bscript.isCanonicalSignature, signature)
1716
return [signature]
1817
}
1918

0 commit comments

Comments
 (0)