Page MenuHomePhabricator

[chronik] Add an avalanche invalidated block ws message
ClosedPublic

Authored by Fabien on Sep 23 2024, 15:59.

Details

Summary

This message triggers upon block invalidated by avalanche.

Depends on D16802.

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.Sep 23 2024, 15:59

Diff looks good but my understanding is behind on how chronik "knows" a block has been invalidated by avalanche. Having trouble following the logic in this diff.

Is chronik already handling this case but just not sending a msg? Where is the case recognized?

PiRK added a subscriber: PiRK.

Diff looks good but my understanding is behind on how chronik "knows" a block has been invalidated by avalanche. Having trouble following the logic in this diff.

Is chronik already handling this case but just not sending a msg? Where is the case recognized?

It is happening in chronik_validationinterface.cpp on line 67. Chronik registers a "validation interface" , and defines what happens when each callback is triggered.
The "avalanche invalidated" callback has been added in D16802

This revision is now accepted and ready to land.Sep 23 2024, 18:55
tobias_ruck added a subscriber: tobias_ruck.

one small nit

chronik/chronik-lib/src/bridge.rs
337–339 ↗(On Diff #49778)