talaia-labs/rust-teos

We don't cover all re-org cases (dispute tx reorged)

Opened this issue · 0 comments

We should handle trackers which are marked as InMempoolSince but their disputes have been reorged.
Right now we only handle trackers which are confirmed and then reorged, we don't consider their disputes nor the disputes of in-mempool trackers.

We should make sure the dispute is confirmed as well.

// TODO: Not only confirmed trackers need to be marked as reorged, but trackers that hasn't confirmed but their
// dispute did confirm in the reorged block. We can pull dispute txids of non confirmed penalties and get their
// confirmation block from our tx_index.
self.reorged_trackers.lock().unwrap().extend(