|
@ -165,27 +165,25 @@ void LP_mainloop(struct LP_peerinfo *mypeer,uint16_t mypubport,int32_t pubsock,i |
|
|
char str[65]; |
|
|
char str[65]; |
|
|
HASH_ITER(hh,LP_utxoinfos,utxo,utmp) |
|
|
HASH_ITER(hh,LP_utxoinfos,utxo,utmp) |
|
|
{ |
|
|
{ |
|
|
if ( LP_txvalue(utxo->coin,utxo->txid,utxo->vout) == 0 ) |
|
|
if ( utxo->spentflag == 0 ) |
|
|
{ |
|
|
{ |
|
|
if ( utxo->spentflag == 0 ) |
|
|
printf("mainloop check spent\n"); |
|
|
|
|
|
if ( LP_txvalue(utxo->coin,utxo->txid,utxo->vout) == 0 ) |
|
|
{ |
|
|
{ |
|
|
printf("txid.%s %s/v%d %.8f has been spent\n",utxo->coin,bits256_str(str,utxo->txid),utxo->vout,dstr(utxo->value)); |
|
|
printf("txid.%s %s/v%d %.8f has been spent\n",utxo->coin,bits256_str(str,utxo->txid),utxo->vout,dstr(utxo->value)); |
|
|
LP_spentnotify(utxo,0); |
|
|
LP_spentnotify(utxo,0); |
|
|
} |
|
|
} |
|
|
} |
|
|
else if ( LP_txvalue(utxo->coin,utxo->txid2,utxo->vout2) == 0 ) |
|
|
else if ( LP_txvalue(utxo->coin,utxo->txid2,utxo->vout2) == 0 ) |
|
|
|
|
|
{ |
|
|
|
|
|
if ( utxo->spentflag == 0 ) |
|
|
|
|
|
{ |
|
|
{ |
|
|
printf("txid2.%s %s/v%d %.8f has been spent\n",utxo->coin,bits256_str(str,utxo->txid2),utxo->vout2,dstr(utxo->value2)); |
|
|
printf("txid2.%s %s/v%d %.8f has been spent\n",utxo->coin,bits256_str(str,utxo->txid2),utxo->vout2,dstr(utxo->value2)); |
|
|
LP_spentnotify(utxo,1); |
|
|
LP_spentnotify(utxo,1); |
|
|
} |
|
|
} |
|
|
} |
|
|
else if ( LP_ismine(utxo) != 0 ) |
|
|
else if ( LP_ismine(utxo) != 0 ) |
|
|
{ |
|
|
{ |
|
|
if ( strcmp(utxo->coin,"KMD") == 0 ) |
|
|
if ( strcmp(utxo->coin,"KMD") == 0 ) |
|
|
LP_priceping(pubsock,utxo,"BTC",profitmargin); |
|
|
LP_priceping(pubsock,utxo,"BTC",profitmargin); |
|
|
else LP_priceping(pubsock,utxo,"KMD",profitmargin); |
|
|
else LP_priceping(pubsock,utxo,"KMD",profitmargin); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|