Merge pull request #331 from maraoz/bug/fix-historic-sync
fix historic sync
This commit is contained in:
commit
7c37e1e35f
|
@ -468,23 +468,25 @@ function spec(b) {
|
||||||
// adapt bitcore TX object to bitcoind JSON response
|
// adapt bitcore TX object to bitcoind JSON response
|
||||||
txInfo.txid = txInfo.hash;
|
txInfo.txid = txInfo.hash;
|
||||||
|
|
||||||
|
|
||||||
var to=0;
|
|
||||||
var tx = txInfo;
|
|
||||||
tx.outs.forEach( function(o) {
|
|
||||||
var s = new Script(o.s);
|
|
||||||
var addrs = self.getAddrStr(s);
|
|
||||||
|
|
||||||
// support only for p2pubkey p2pubkeyhash and p2sh
|
var to = 0;
|
||||||
if (addrs.length === 1) {
|
var tx = txInfo;
|
||||||
tx.out[to].addrStr = addrs[0];
|
if (tx.outs) {
|
||||||
tx.out[to].n = to;
|
tx.outs.forEach(function(o) {
|
||||||
}
|
var s = new Script(o.s);
|
||||||
to++;
|
var addrs = self.getAddrStr(s);
|
||||||
});
|
|
||||||
|
// support only for p2pubkey p2pubkeyhash and p2sh
|
||||||
|
if (addrs.length === 1) {
|
||||||
|
tx.out[to].addrStr = addrs[0];
|
||||||
|
tx.out[to].n = 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) {
|
||||||
|
|
Loading…
Reference in New Issue