fix historic sync

This commit is contained in:
Manuel Araoz 2014-02-14 18:02:57 -03:00
parent a0ebb1d2e1
commit 75b4f5e098
1 changed files with 16 additions and 14 deletions

View File

@ -469,22 +469,24 @@ function spec(b) {
txInfo.txid = txInfo.hash; txInfo.txid = txInfo.hash;
var to=0; var to = 0;
var tx = txInfo; var tx = txInfo;
tx.outs.forEach( function(o) { if (tx.outs) {
var s = new Script(o.s); tx.outs.forEach(function(o) {
var addrs = self.getAddrStr(s); var s = new Script(o.s);
var addrs = self.getAddrStr(s);
// support only for p2pubkey p2pubkeyhash and p2sh // support only for p2pubkey p2pubkeyhash and p2sh
if (addrs.length === 1) { if (addrs.length === 1) {
tx.out[to].addrStr = addrs[0]; tx.out[to].addrStr = addrs[0];
tx.out[to].n = to; tx.out[to].n = to;
} }
to++; to++;
}); });
}
var count = 0; var count = 0;
txInfo.vin = txInfo.in.map(function(txin) { txInfo.vin = txInfo. in .map(function(txin) {
var i = {}; var i = {};
if (txin.coinbase) { if (txin.coinbase) {