Permalink
Commits on Jul 19, 2017
Commits on Jul 17, 2017
  1. Add a discard_rate

    Any change output which would be dust at the discard_rate you are
    willing to discard completely and add to fee (as well as continuing to
    pay the fee that would have been needed for creating the change).
    morcos committed Jul 6, 2017
  2. Convert named argument from nblocks to conf_target

    in estimatesmartfee and estimaterawfee.  Also reuse existing bounds checking.
    morcos committed Jul 12, 2017
  3. Improve api to estimatesmartfee

    Change parameter for conservative estimates to be an estimate_mode string.
    Change to never return a -1 for failure but to instead omit the feerate and
    return an error string.  Throw JSONRPC error on invalid nblocks parameter.
    morcos committed Jun 29, 2017
  4. Remove factor of 3 from definition of dust.

    This redefines dust to be the value of an output such that it would
    cost that value in fees to (create and) spend the output at the dust
    relay rate.  The previous definition was that it would cost 1/3 of the
    value.  The default dust relay rate is correspondingly increased to
    3000 sat/kB so the actual default dust output value of 546 satoshis
    for a non-segwit output remains unchanged.  This commit is a refactor
    only unless a dustrelayfee is passed on the commandline in which case
    that number now needs to be increased by a factor of 3 to get the same
    behavior.  -dustrelayfee is a hidden command line option.
    
    Note: It's not exactly a refactor due to edge case changes in rounding
    as evidenced by the required change to the unit test.
    morcos committed Jul 17, 2017
Commits on Jul 15, 2017
  1. Remove checking of mempool min fee from estimateSmartFee.

    This check has been moved to the wallet logic GetMinimumFee. The rpc call to
    estimatesmartfee will now no longer return a result maxed with the mempool min
    fee, but automated fee calculations from the wallet will produce the same result
    as before and coincontrol and sendcoins dialogs in the GUI will correctly
    display the right prospective fee.
    
    changes to policy/fees.cpp include a big whitespace indentation change.
    morcos committed Jun 29, 2017
  2. Make QT fee displays use GetMinimumFee instead of estimateSmartFee

    Remove helper function (CalculateEstimateType) for determining whether
    estimates should be conservative or not, now that this is only called
    once from GetMinimumFee and incorporate the logic directly there.
    morcos committed Jun 29, 2017
  3. Use CoinControl to pass custom fee setting from QT.

    This fixes buggy behavior where we were temporarily setting and unsetting the
    global payTxFee when trying to send a transaction with a custom fee from the
    GUI. The previous behavior was inconsistent depending on the order of using the
    RPC call settxfee and clicking various radio buttons in the sendcoinsdialog.
    The new behavior is that transactions sent with the GUI will always use either
    the smartfee slider value or the custom fee set on the GUI and they will not
    affect the global defaults which are only for RPC and initial GUI values.
    morcos committed Jun 28, 2017
  4. Refactor to use CoinControl in GetMinimumFee and FeeBumper

    Improve parameter precedence in coin_control
    morcos committed Jun 28, 2017
Commits on Jul 13, 2017
Commits on Jul 11, 2017
  1. Fix rare edge case of paying too many fees when transaction has no ch…

    …ange.
    
    Due to the iterative process of selecting new coins in each loop a new fee is
    calculated that needs to be met each time.  In the typical case if the most
    recent iteration of the loop produced a much smaller transaction and we have now
    gathered inputs with too many fees, we can just reduce the change.  However in
    the case where there is no change output, it is possible to end up with a
    transaction which drastically overpays fees.  This commit addresses that case,
    by creating a change output if the overpayment is large enough to support it,
    this is accomplished by rerunning the transaction creation loop without
    selecting new coins.
    
    Thanks to instagibbs for working on this as well
    morcos committed Jun 30, 2017
  2. Only reserve key for scriptChange once in CreateTransaction

    This does not affect behavior but allows us to have access to an output to
    scriptChange even if we currently do not have change in the transaction.
    morcos committed Jun 30, 2017
  3. Change API to estimaterawfee

    Report results for all 3 possible time horizons instead of specifying time horizon as an argument.
    morcos committed Jun 6, 2017
Commits on Jul 10, 2017
  1. Add RPC options for RBF, confirmation target, and conservative fee es…

    …timation.
    
    Add support for setting each of these attributes on a per RPC call basis to sendtoaddress, sendmany, fundrawtransaction (already had RBF), and bumpfee (already had RBF and conf target).
    morcos committed Jun 14, 2017
Commits on Jul 7, 2017
  1. Change default fee estimation mode.

    Fee estimates will default to be non-conservative if the transaction in question is opt-in-RBF.
    morcos committed Jun 13, 2017
  2. Introduce a fee estimate mode.

    GetMinimumFee now passes the conservative argument into estimateSmartFee.
    Call CalculateEstimateType(mode) before calling GetMinimumFee or estimateSmartFee to determine the value of this argument.
    CCoinControl can now be used to control this mode.
    morcos committed Jun 13, 2017
Commits on Jun 27, 2017
  1. Add belt-and-suspenders in DisconnectBlock

    These extra variables were previously checked before the move to per-txout database.
    morcos committed Jun 8, 2017
  2. Make check to distinguish between orphan txs and old txs more efficient.

    Checking for the existence in the CCoinsViewCache of the outputs of a new tx
    will result in a disk hit for every output since they will not be found.  On the
    other hand if those outputs exist already, then the inputs must also have been
    missing, so we can move this check inside the input existence check so in the
    common case of a new tx it doesn't need to run.
    
    The purpose of the check is to avoid spamming the orphanMap with slightly old
    txs which we have already seen in a block, but it is already only optimistic
    (depending on the outputs not being spent), so make it even more efficient by
    only checking the cache and not the entire pcoinsTip.
    morcos committed Jun 8, 2017
Commits on Jun 14, 2017
  1. Pass in smart fee slider value to coin control dialog

    Since cfe77ef the global nTxConfirmTarget wasn't being updated by the smart
    fee slider and thus the coin control dialog and labels were not being updated.
    morcos committed Jun 13, 2017
Commits on Jun 13, 2017
Commits on Jun 12, 2017
Commits on Jun 8, 2017
  1. Change semantics of HaveCoinInCache to match HaveCoin

    Previously it was possible for HaveCoinInCache to return true for a spent
    coin. It is more clear to keep the semantics the same. HaveCoinInCache is
    used for two reasons:
    - tracking coins we may want to uncache, in which case it is unlikely there
    would be spent coins we could uncache (not dirty)
    - optimistically checking whether we have already included a tx in the
    blockchain, in which case a spent coin is not a reliable indicator that we have.
    morcos committed Jun 8, 2017
Commits on May 18, 2017
  1. Populate services in GetLocalAddress

    Previously if we didn't have any local addresses, GetLocalAddress would return
    0.0.0.0 and then we'd swap in a peer's notion of our address in AdvertiseLocal,
    but then nServices would never get set.
    morcos committed May 18, 2017
Commits on May 17, 2017
Commits on May 11, 2017