-
Notifications
You must be signed in to change notification settings - Fork 440
Furthur changes to redesign structures. #971
Description
Describe the enhancement
After a call with @LLFourn, the follow things will be added (either to this PR, or a separate PR):
-
ThePersistBackend<T, C>trait currently has a genericTfor the "in memory representation". This also constrainsCto "accompany"T, thus requiring us to have something likeTrackerin Implement persistence with the new structures #965. The "onioning" of these structures is unfortunate. However, there is a way to doPersistBackendwithoutTand just rely onC! Let's experiment with that to see if it cleans up the API and reduces "onioning".
-- Completed by Implement persistence with the new structures #965 -
ChainOracle::get_chain_tip(&self) -> Result<Option<BlockId>, Self::Error>will be added. This is needed as we need something to input as the "static block" for theis_block_in_best_chaincall. Additionally, a structure that is capable of implementingChainOraclefunctionality should also have the functionality to return the tip of the best chain. -
OwnedIndexeris bad. Here is something better:pub trait OwnedTxOuts { type SpkIndex; type Iter: Iterator<Item = (Self::SpkIndex, OutPoint)>; fn owned_txouts(&self) -> Self::Iter; }
This thing iterates over all outpoints that we own (alongside the spk index we give it). To get the owned UTXO set, we filter over this. Same thing for balance.
-- Turns outOwnedTxOutsis not needed either, all removed in Improvetxoutlisting and balance APIs for redesigned structures #975
Metadata
Metadata
Assignees
Labels
Type
Projects
Status