feat(chain): Add initial_changeset to graphs
Add `initial_changeset` to TxGraph and IndexedTxGraph
This commit is contained in:
@@ -438,6 +438,11 @@ impl<A: Clone + Ord> TxGraph<A> {
|
||||
changeset
|
||||
}
|
||||
|
||||
/// Determines the [`ChangeSet`] between `self` and an empty [`TxGraph`].
|
||||
pub fn initial_changeset(&self) -> ChangeSet<A> {
|
||||
Self::default().determine_changeset(self.clone())
|
||||
}
|
||||
|
||||
/// Applies [`ChangeSet`] to [`TxGraph`].
|
||||
pub fn apply_changeset(&mut self, changeset: ChangeSet<A>) {
|
||||
for tx in changeset.txs {
|
||||
|
||||
Reference in New Issue
Block a user