bitcoin/BRWallet.c
// true if the address was previously used as an output in any wallet transaction
true if the address was previously used as an output in any wallet transaction
true if the address was previously used as an output in any wallet transaction
int BRWalletAddressIsUsed(BRWallet *wallet, const char *addr)
{
    int r = 0;
    UInt160 pkh = UINT160_ZERO;
    assert(wallet != NULL);
    assert(addr != NULL);
    pthread_mutex_lock(&wallet->lock);
    if (addr) BRAddressHash160(&pkh, wallet->addrParams, addr);
    r = BRSetContains(wallet->usedPKH, &pkh);
    pthread_mutex_unlock(&wallet->lock);
    return r;
}
int BRWalletAddressIsUsed ( BRWallet * wallet , const char * addr ) { int r = 0 ; UInt160 pkh = UINT160_ZERO ; assert ( wallet != NULL ) ; assert ( addr != NULL ) ; pthread_mutex_lock ( & wallet -> lock ) ; if ( addr ) BRAddressHash160 ( & pkh , wallet -> addrParams , addr ) ; r = BRSetContains ( wallet -> usedPKH , & pkh ) ; pthread_mutex_unlock ( & wallet -> lock ) ; return r ; }
true if the address was previously used as an output in any wallet transaction
true if the address was previously used as an output in any wallet transaction