pub fn try_balance<C: ChainOracle, OI: Clone>(
&self,
chain: &C,
chain_tip: BlockId,
outpoints: impl IntoIterator<Item = (OI, OutPoint)>,
mut trust_predicate: impl FnMut(&OI, &Script) -> bool,
) -> Result<Balance, C::Error> {
OI is unnecessary. The caller passes it to us and then we query it. It can just be:
pub fn try_balance<C: ChainOracle>(
&self,
chain: &C,
chain_tip: BlockId,
outpoints: impl IntoIterator<Item = OutPoint>,
mut trust_predicate: impl FnMut(&OutPoint, &Script) -> bool,
) -> Result<Balance, C::Error> {
If the caller wants to know the value of OI in trust predicate it can just look it up itself via the OutPoint.
OIis unnecessary. The caller passes it to us and then we query it. It can just be:If the caller wants to know the value of
OIin trust predicate it can just look it up itself via theOutPoint.