Removes circular dependancy of ECKey
This commit is contained in:
parent
bfc5924522
commit
10dea421d5
3 changed files with 7 additions and 8 deletions
src
|
@ -272,10 +272,7 @@ var ECDSA = {
|
|||
throw new Error("Pubkey recovery unsuccessful");
|
||||
}
|
||||
|
||||
// TODO (shtylman) this is stupid because this file and eckey
|
||||
// have circular dependencies
|
||||
var ECPubKey = require('./eckey').ECPubKey;
|
||||
return ECPubKey(Q);
|
||||
return Q
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -293,7 +290,7 @@ var ECDSA = {
|
|||
for (var i = 0; i < 4; i++) {
|
||||
var pubKey = ECDSA.recoverPubKey(r, s, hash, i)
|
||||
|
||||
if (pubKey.pub.equals(origPubKey.pub)) {
|
||||
if (pubKey.equals(origPubKey)) {
|
||||
return i
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue