|
|
@ -543,24 +543,27 @@ void LP_coinsloop(void *_coins) |
|
|
|
{ |
|
|
|
DL_FOREACH_SAFE(ap->utxos,up,tmp) |
|
|
|
{ |
|
|
|
if ( up->SPV == 0 ) |
|
|
|
if ( up->U.height > 0 && up->spendheight < 0 ) |
|
|
|
{ |
|
|
|
nonz++; |
|
|
|
up->SPV = LP_merkleproof(coin,backupep,up->U.txid,up->U.height); |
|
|
|
if ( up->SPV > 0 ) |
|
|
|
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 ) |
|
|
|
if ( up->SPV == 0 ) |
|
|
|
{ |
|
|
|
nonz++; |
|
|
|
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); |
|
|
|
if ( up->SPV > 0 ) |
|
|
|
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); |
|
|
|
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); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|