jl777 7 years ago
parent
commit
0c55fbec5e
  1. 35
      iguana/exchanges/LP_nativeDEX.c

35
iguana/exchanges/LP_nativeDEX.c

@ -543,24 +543,27 @@ void LP_coinsloop(void *_coins)
{ {
DL_FOREACH_SAFE(ap->utxos,up,tmp) DL_FOREACH_SAFE(ap->utxos,up,tmp)
{ {
if ( up->SPV == 0 ) if ( up->U.height > 0 && up->spendheight < 0 )
{ {
nonz++; if ( up->SPV == 0 )
up->SPV = LP_merkleproof(coin,backupep,up->U.txid,up->U.height); {
if ( up->SPV > 0 ) nonz++;
printf("%s %s: SPV.%d\n",coin->symbol,bits256_str(str,up->U.txid),up->SPV);
}
else if ( up->SPV == -1 )
{
nonz++;
printf("SPV failure for %s %s\n",coin->symbol,bits256_str(str,up->U.txid));
oldht = up->U.height;
LP_txheight_check(coin,ap->coinaddr,up);
if ( oldht != up->U.height )
up->SPV = LP_merkleproof(coin,backupep,up->U.txid,up->U.height); up->SPV = LP_merkleproof(coin,backupep,up->U.txid,up->U.height);
if ( up->SPV <= 0 ) if ( up->SPV > 0 )
up->SPV = -2; printf("%s %s: SPV.%d\n",coin->symbol,bits256_str(str,up->U.txid),up->SPV);
else printf("%s %s: corrected SPV.%d\n",coin->symbol,bits256_str(str,up->U.txid),up->SPV); }
else if ( up->SPV == -1 )
{
nonz++;
printf("SPV failure for %s %s\n",coin->symbol,bits256_str(str,up->U.txid));
oldht = up->U.height;
LP_txheight_check(coin,ap->coinaddr,up);
if ( oldht != up->U.height )
up->SPV = LP_merkleproof(coin,backupep,up->U.txid,up->U.height);
if ( up->SPV <= 0 )
up->SPV = -2;
else printf("%s %s: corrected SPV.%d\n",coin->symbol,bits256_str(str,up->U.txid),up->SPV);
}
} }
} }
} }

Loading…
Cancel
Save