Page MenuHomePhabricator

[herald] function to handle block connected msg
ClosedPublic

Authored by bytesofman on Apr 7 2023, 18:42.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCa1c0af9ef710: [herald] function to handle block connected msg
Summary

T2972

Depends on D13619

Move logic to handle BlockConnected msg to its own function. Add unit tests for failure and backup tg msgs.

Test Plan

npm test

Diff Detail

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

Event Timeline

This revision is now accepted and ready to land.Apr 9 2023, 06:53
Fabien requested changes to this revision.Apr 9 2023, 06:57
Fabien added inline comments.
apps/ecash-herald/src/events.js
41 ↗(On Diff #39413)

return await ...

53 ↗(On Diff #39413)

default to return false

apps/ecash-herald/test/eventsTests.js
94 ↗(On Diff #39413)

Also check the case where it returns false

This revision now requires changes to proceed.Apr 9 2023, 06:57

Add case for sendMessage error, feedback response

Fabien added inline comments.
apps/ecash-herald/test/eventsTests.js
124 ↗(On Diff #39496)

Same remark as D13617, this assert is useless and should be removed

This revision is now accepted and ready to land.Apr 10 2023, 18:54