bitcoin/BRWallet.c
// outputs below this amount are uneconomical due to fees (TX_MIN_OUTPUT_AMOUNT is the absolute minimum output amount)
// use feePerKb UINT64_MAX to indicate that the wallet feePerKb should be used
outputs below this amount are uneconomical due to fees (TX_MIN_OUTPUT_AMOUNT is the absolute minimum output amount)
use feePerKb UINT64_MAX to indicate that the wallet feePerKb should be used
outputs below this amount are uneconomical due to fees ( TX_MIN_OUTPUT_AMOUNT is the absolute minimum output amount ) use feePerKb UINT64_MAX to indicate that the wallet feePerKb should be used
uint64_t BRWalletMinOutputAmountWithFeePerKb(BRWallet *wallet, uint64_t feePerKb)
{
    uint64_t amount;
    assert(wallet != NULL);
    pthread_mutex_lock(&wallet->lock);
    feePerKb = UINT64_MAX == feePerKb ? wallet->feePerKb : feePerKb;
    amount = (TX_MIN_OUTPUT_AMOUNT*feePerKb + MIN_FEE_PER_KB - 1)/MIN_FEE_PER_KB;
    pthread_mutex_unlock(&wallet->lock);
    return (amount > TX_MIN_OUTPUT_AMOUNT) ? amount : TX_MIN_OUTPUT_AMOUNT;
}
uint64_t BRWalletMinOutputAmountWithFeePerKb ( BRWallet * wallet , uint64_t feePerKb ) { uint64_t amount ; assert ( wallet != NULL ) ; pthread_mutex_lock ( & wallet -> lock ) ; feePerKb = UINT64_MAX == feePerKb ? wallet -> feePerKb : feePerKb ; amount = ( TX_MIN_OUTPUT_AMOUNT * feePerKb + MIN_FEE_PER_KB - 1 ) / MIN_FEE_PER_KB ; pthread_mutex_unlock ( & wallet -> lock ) ; return ( amount > TX_MIN_OUTPUT_AMOUNT ) ? amount : TX_MIN_OUTPUT_AMOUNT ; }
outputs below this amount are uneconomical due to fees (TX_MIN_OUTPUT_AMOUNT is the absolute minimum output amount)
use feePerKb UINT64_MAX to indicate that the wallet feePerKb should be used
outputs below this amount are uneconomical due to fees ( TX_MIN_OUTPUT_AMOUNT is the absolute minimum output amount ) use feePerKb UINT64_MAX to indicate that the wallet feePerKb should be used