Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow honoring reserve in send_all_to_address #345

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Commits on Aug 30, 2024

  1. Configuration menu
    Copy the full SHA
    7202c83 View commit details
    Browse the repository at this point in the history
  2. Refactor FeeEstimator to introduce local target variants

    .. previously we used LDK's `FeeEstimator` and `ConfirmationTarget` and
    ~misused some of the latter's variants for our non-Lightning operations.
    
    Here, we introduce our own `FeeEstimator` and `ConfirmationTarget`
    allowing to add specific variants for `ChannelFunding` and
    `OnchainPayment`s, for example.
    tnull committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    bf4655a View commit details
    Browse the repository at this point in the history
  3. f s/which we use/used/

    tnull committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    9b1ea5a View commit details
    Browse the repository at this point in the history
  4. Log HTTP 400 at TRACE instead of ignoring it

    .. while it's most often bitcoind already knowing about a transaction
    already, the error sometimes holds additional information (e.g., not
    meeting the mempool min).
    tnull committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    01c499e View commit details
    Browse the repository at this point in the history
  5. Allow honoring reserve in send_all_to_address

    Previously, `OnchainPayment::send_all_to_address` could only be used to
    fully drain the onchain wallet, i.e., would not retain any reserves.
    
    Here, we try to introduce a `retain_reserves` bool that allows users to
    send all funds while honoring the configured on-chain reserves. While
    we're at it, we move the reserve checks for `send_to_address` also to
    the internal wallet's method, which makes the checks more accurate as
    they now are checked against the final transaction value, including
    transaction fees.
    tnull committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    0223698 View commit details
    Browse the repository at this point in the history
  6. f Fix logged argument order

    tnull committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    e86d843 View commit details
    Browse the repository at this point in the history
  7. f Make sure transaction is relayable

    .. rather than undercutting the fee, we now choose a method that might
    slightly overestimate fees, ensuring its relayability. We also make sure
    the net fee is always larger than the fee rate floor.
    tnull committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    326cc38 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    156a970 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    b0f8d6c View commit details
    Browse the repository at this point in the history