iotaledger/wallet.rs

Cache participation data for spent outputs

Closed this issue · 0 comments

Description

Currently all outputs are requested

let outputs = self.outputs(None).await?;

If an output was spent, there should only be one more request to get the latest state and then its data shouldn't be requested anymore

Motivation

If an output is spent, it stops participating from that point on, so its participation can't change anymore and all future requests would only return the same data and are wasted

Requirements

  1. If an output is spent, request its participation data one last time to get the latest state and cache it
  2. If its cached, don't request it anymore, but merge the cached participation data with the current ones

Are you planning to do it yourself in a pull request?

No.