use bdk_chain::Merge;
use bitcoin::OutPoint;
use serde::{Deserialize, Serialize};
use crate::collections::BTreeMap;
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ChangeSet {
pub outpoints: BTreeMap<OutPoint, bool>,
}
impl Merge for ChangeSet {
fn merge(&mut self, other: Self) {
self.outpoints.extend(other.outpoints);
}
fn is_empty(&self) -> bool {
self.outpoints.is_empty()
}
}