From 03dd134305b49b2f117b2d66d8229980715087fe Mon Sep 17 00:00:00 2001 From: "Owain G. Ainsworth" Date: Wed, 9 Apr 2014 19:30:59 +0100 Subject: [PATCH] adapt for btcec changes. --- opcode.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/opcode.go b/opcode.go index cfe78a70c..998fc9533 100644 --- a/opcode.go +++ b/opcode.go @@ -1806,7 +1806,7 @@ func opcodeCheckSig(op *parsedOpcode, s *Script) error { spew.Sdump(pkStr), pubKey.X, pubKey.Y, signature.R, signature.S, spew.Sdump(hash)) })) - ok := ecdsa.Verify(pubKey, hash, signature.R, signature.S) + ok := ecdsa.Verify(pubKey.ToECDSA(), hash, signature.R, signature.S) s.dstack.PushBool(ok) return nil } @@ -1845,7 +1845,7 @@ func opcodeCheckMultiSig(op *parsedOpcode, s *Script) error { return StackErrTooManyOperations } pubKeyStrings := make([][]byte, npk) - pubKeys := make([]*ecdsa.PublicKey, npk) + pubKeys := make([]*btcec.PublicKey, npk) for i := range pubKeys { pubKeyStrings[i], err = s.dstack.PopByteArray() if err != nil { @@ -1930,7 +1930,7 @@ func opcodeCheckMultiSig(op *parsedOpcode, s *Script) error { continue } } - success = ecdsa.Verify(pubKeys[curPk], hash, + success = ecdsa.Verify(pubKeys[curPk].ToECDSA(), hash, signatures[i].s.R, signatures[i].s.S) if success { break inner