At the moment, in case of block disconnection, if any conflicting transaction was inside, we don’t undo conflicts on wallet transactions, i.e they stay in state CONFLICTED
instead of being marked again as UNCONFIRMED
. This shortcoming causes inaccurate balance computation and blocks the user from re-submitting the tx back to the mempool.
Currently, if conflicted transaction was later confirmed, the status is updated accordingly and nothing changes. This PR undoes conflict(s) and also cleans up some of MarkConflicted
which is renamed UpdatedConflicts
to cover both instances of unconfirmed to conflicted and conflicted to unconfirmed cases.
Lambda is used, but I’m open to other approaches.