test working, signMessage

This commit is contained in:
Matias Alejo Garcia 2014-11-26 15:15:12 -03:00
commit 1c4783468e
9 changed files with 222 additions and 250 deletions

View file

@ -144,6 +144,7 @@ Wallet.builderOpts = {
signhash: bitcore.Transaction.SIGHASH_ALL,
fee: undefined,
feeSat: undefined,
builderClass: undefined,
};
/**
@ -377,13 +378,14 @@ Wallet.prototype._getKeyMap = function(txp) {
var inSig0, keyMapAll = {},
self = this;
_.each(txp.getSignersPubKey(), function(inputSignersPubKey, i) {
var signersPubKeys = txp.getSignersPubKeys();
_.each(signersPubKeys, function(inputSignersPubKey, i) {
var keyMap = self.publicKeyRing.copayersForPubkeys(inputSignersPubKey, txp.inputChainPaths);
if (_.size(keyMap) !== _.size(inputSignersPubKey))
throw new Error('Signature does not match known copayers');
keyMapAll = _.extend(keyMap, keyMapAll);
_.extend(keyMapAll, keyMap);
// From here -> only to check that all inputs have the same sigs
var inSigArr = _.values(keyMap);