|
@ -167,15 +167,16 @@ void LP_availableset(struct LP_utxoinfo *utxo) |
|
|
int32_t LP_utxopurge(int32_t allutxos) |
|
|
int32_t LP_utxopurge(int32_t allutxos) |
|
|
{ |
|
|
{ |
|
|
char str[65]; struct LP_utxoinfo *utxo,*tmp; int32_t iambob,n = 0; |
|
|
char str[65]; struct LP_utxoinfo *utxo,*tmp; int32_t iambob,n = 0; |
|
|
|
|
|
printf("LP_utxopurge mypub.(%s)\n",bits256_str(str,LP_mypubkey)); |
|
|
portable_mutex_lock(&LP_utxomutex); |
|
|
portable_mutex_lock(&LP_utxomutex); |
|
|
for (iambob=0; iambob<=1; iambob++) |
|
|
for (iambob=0; iambob<=1; iambob++) |
|
|
{ |
|
|
{ |
|
|
HASH_ITER(hh,LP_utxoinfos[iambob],utxo,tmp) |
|
|
HASH_ITER(hh,LP_utxoinfos[iambob],utxo,tmp) |
|
|
|
|
|
{ |
|
|
|
|
|
if ( LP_isavailable(utxo) > 0 ) |
|
|
{ |
|
|
{ |
|
|
printf("purge.(%s) ?\n",bits256_str(str,utxo->payment.txid)); |
|
|
printf("purge.(%s) ?\n",bits256_str(str,utxo->payment.txid)); |
|
|
if ( allutxos != 0 || LP_ismine(utxo) == 0 ) |
|
|
if ( allutxos != 0 || LP_ismine(utxo) == 0 ) |
|
|
{ |
|
|
|
|
|
if ( LP_isavailable(utxo) == 0 ) |
|
|
|
|
|
{ |
|
|
{ |
|
|
printf("delete.(%s)\n",bits256_str(str,utxo->payment.txid)); |
|
|
printf("delete.(%s)\n",bits256_str(str,utxo->payment.txid)); |
|
|
HASH_DELETE(hh,LP_utxoinfos[iambob],utxo); |
|
|
HASH_DELETE(hh,LP_utxoinfos[iambob],utxo); |
|
@ -184,11 +185,11 @@ int32_t LP_utxopurge(int32_t allutxos) |
|
|
} else n++; |
|
|
} else n++; |
|
|
} |
|
|
} |
|
|
HASH_ITER(hh,LP_utxoinfos2[iambob],utxo,tmp) |
|
|
HASH_ITER(hh,LP_utxoinfos2[iambob],utxo,tmp) |
|
|
|
|
|
{ |
|
|
|
|
|
if ( LP_isavailable(utxo) > 0 ) |
|
|
{ |
|
|
{ |
|
|
printf("purge.(%s) ?\n",bits256_str(str,utxo->payment.txid)); |
|
|
printf("purge.(%s) ?\n",bits256_str(str,utxo->payment.txid)); |
|
|
if ( allutxos != 0 || LP_ismine(utxo) == 0 ) |
|
|
if ( allutxos != 0 || LP_ismine(utxo) == 0 ) |
|
|
{ |
|
|
|
|
|
if ( LP_isavailable(utxo) == 0 ) |
|
|
|
|
|
{ |
|
|
{ |
|
|
printf("delete.(%s)\n",bits256_str(str,utxo->payment.txid)); |
|
|
printf("delete.(%s)\n",bits256_str(str,utxo->payment.txid)); |
|
|
HASH_DELETE(hh,LP_utxoinfos2[iambob],utxo); |
|
|
HASH_DELETE(hh,LP_utxoinfos2[iambob],utxo); |
|
|