Skip to content

Commit

Permalink
Add method for marking MUTXOs as abandoned
Browse files Browse the repository at this point in the history
  • Loading branch information
Sword-Smith committed Jul 24, 2023
1 parent fd366bc commit c502226
Show file tree
Hide file tree
Showing 2 changed files with 401 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/models/state/wallet/monitored_utxo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ pub struct MonitoredUtxo {

// hash of the block, if any, in which this UTXO was confirmed
pub confirmed_in_block: Option<(Digest, Duration, BlockHeight)>,

/// Indicator used to mark the UTXO as belonging to an abandoned fork
/// Indicates what was the block tip when UTXO was marked as abandoned
pub abandoned_at: Option<(Digest, Duration, BlockHeight)>,
}

impl MonitoredUtxo {
Expand All @@ -34,6 +38,7 @@ impl MonitoredUtxo {
number_of_mps_per_utxo: max_number_of_mps_stored,
spent_in_block: None,
confirmed_in_block: None,
abandoned_at: None,
}
}

Expand Down
Loading

0 comments on commit c502226

Please sign in to comment.