Page MenuHomePhabricator

[avalanche] Check that a UTXO has not been reassigned before erasing it
AbandonedPublic

Authored by Fabien on Oct 22 2021, 13:09.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Summary

This diff adds a safety check that prevents from erasing an UTXO that would have been reassigned to another peer. This is currently not possible but will be used when managing conflicting proofs in the peer manager. Also it makes the code more robust anyway, so it's worth it even without conflicting proofs.

Ret T1854.

Test Plan
ninja all check-all

Diff Detail

Event Timeline

Fabien requested review of this revision.Oct 22 2021, 13:09
deadalnix requested changes to this revision.Oct 27 2021, 14:25
deadalnix added a subscriber: deadalnix.

I don't think this makes any sense. If there is a concurrency problem, then the right way to solve it is to use locks. Right now, we don't do concurency within the peer manager, so no lock needed.

This revision now requires changes to proceed.Oct 27 2021, 14:25

This is a premature optimization, leave it for now