/// Whether the utxo is/was/will be spendable with chain `tip`.
///
+ /// Currently this method does not take into account the locktime.
+ ///
/// This is the alternative version of [`is_spendable_at`] which depends on `chain_position`
/// being a [`ObservedAs<A>`] where `A` implements [`BlockAnchor`].
///
return false;
}
}
- // [TODO] Why are unconfirmed txs always considered unspendable here?
ObservedAs::Unconfirmed(_) => return false,
};
self.graph_additions.append(other.graph_additions);
self.index_additions.append(other.index_additions);
if self.last_height < other.last_height {
- let last_height = other
- .last_height
- .expect("must exist as it is larger than self.last_height");
- self.last_height.replace(last_height);
+ self.last_height = Some(
+ other
+ .last_height
+ .expect("must exist as it is larger than self.last_height"),
+ );
}
}
}