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

unconfirmed tx chaining. spend unconfirmed utxos. #197

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Commits on Sep 26, 2024

  1. feat: wallet unconfirmed balance.

    wallet subscribes to mempool via tokio broadcast to track owned utxos.
    
    Changes:
    
     * add spent_utxos, unspent_utxos lists to WalletState struct
     * add WalletState::handle_mempool_event()
     * add test confirmed_and_unconfirmed_balance()
     * add Mempool::event_channel (tokio broadcast channel)
     * Mempool faillible mutation methods return Result()
     * Mempool mutable methods broadcast MempoolEvent
     * add tests::shared::mine_block_to_wallet()
     * lib.rs: spawn wallet task for listening to mempool events
       and dispatch to WalletState for handling.
     * add locks::tokio::AtomicRw::try_lock_guard_mut()
    dan-da committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    98f8071 View commit details
    Browse the repository at this point in the history
  2. refactor: wallet updates now atomic with mempool

    removes the mempool broadcast channel and wallet listener task.
    
    Instead all mempool mutations go through GlobalState methods
    which inform wallet of the changes.  This makes changes atomic
    over mempool+wallet so they are always in sync.
    
    Changes:
     * remove Mempool::event_channel
     * Mempool &mut methods only callable by super
     * Mempool &mut methods return MempoolEvent(s)
     * add MempoolEvent::UpdateTxMutatorSet.  (unused)
     * add GlobalState methods: mempool_clear, mempool_insert,
        mempool_prune_stale_transactions
     * remove spawn_wallet_task from lib.rs
     * add/improve doc-comments
    dan-da committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    da50084 View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2024

  1. wip. compiles

    dan-da committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    fd3aa19 View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2024

  1. Configuration menu
    Copy the full SHA
    bc6487e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2e87969 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4c56dd5 View commit details
    Browse the repository at this point in the history