Page MenuHomePhabricator

[avalanche] Make the BlockFinalized validation callback asynchronous
ClosedPublic

Authored by Fabien on Jan 17 2024, 20:38.

Details

Summary

There is no reason the make it synchronous. Also avoid holding a lock when calling the callback for good measure.

Test Plan
ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.Jan 17 2024, 20:38
bytesofman added inline comments.
src/validation.cpp
3706 ↗(On Diff #44307)

what do these brackets do?

tobias_ruck added inline comments.
src/validation.cpp
3706 ↗(On Diff #44307)

It's C++'s way of defining a scope, basically before the LOCK would go all the way to the return true (and including the BlockFinalized call) and would then be released, but with the scope it only goes to the closing }.

This revision is now accepted and ready to land.Jan 18 2024, 10:17