Open aszepieniec opened 1 year ago
We're using DbtVec
to store monitored UTXOs. And we cannot delete from the middle of a list, we only have a pop
method to delete from the end of a list. Intead, I suggest we mark MonitoredUtxo
in the database as abandoned
and adapt the rest of the logic to deal with that.
The node periodically runs a maintenance task to try to synchronize the membership proofs of owned UTXOs. But when the owned UTXOs live on an abandoned chain whose last common ancestor with the canonical one was deep enough, it's probably better to delete them.