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

refactor(chain)!: Change tx_last_seen to Option<u64> #1416

Merged
merged 9 commits into from
Jul 2, 2024

Commits on Jun 23, 2024

  1. fix(wallet)!: Rework Wallet::insert_tx to no longer insert anchors

    since we'd be lacking context that should normally occur during
    sync with a chain source. The logic for inserting a graph
    anchor from a `ConfirmationTime` is moved to the wallet common
    test module in order to simulate receiving new txs and
    confirming them.
    ValuedMammal committed Jun 23, 2024
    Configuration menu
    Copy the full SHA
    324eeb3 View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2024

  1. fix(tx_graph)!: Change tx_last_seen to Option<u64>

    Also fixup `test_list_owned_txouts` to check that the right
    outputs, utxos, and balance are returned at different local
    chain heights.
    
    This fixes an issue where unbroadcast and otherwise non-canonical
    transactions were returned from methods `list_chain_txs` and
    `Wallet::transactions` because every tx inserted had a last_seen
    of 0 making it appear unconfirmed.
    
    Note this commit changes the way `Balance` is represented due to
    new logic in `try_get_chain_position` that no longer considers
    txs with non-canonical anchors. Before this change, a tx anchored
    to a block that is reorged out had a permanent effect on the
    pending balance, and now only txs with a last_seen time or an
    anchor confirmed in the best chain will return a `ChainPosition`.
    ValuedMammal committed Jun 30, 2024
    Configuration menu
    Copy the full SHA
    bbc19c3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    36f5887 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2ce4bb4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b34790c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c405729 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    496601b View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    6204d2c View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    af75817 View commit details
    Browse the repository at this point in the history