-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A0-544: Alerter backup saving #335
Conversation
Please make sure the following happened
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, only two tiny comments, you might even want to just ignore the latter if it's too much work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment, possibly ignorable
Backup saving is added into
alerter::Service
as an intermediary step between handling the data byHandler
, and sending the data out to the network so that the cycle of data of typeAlert
orMultisigned
which passes through alerter is like this:data
gets handled by theHandler
which returns someresponse
which is stored in theService
data
is passed tobackup
via an appropriate channelbackup
responds withdata
which triggers a branch in the mainselect!
loopresponse
corresponding todata
is retrieved from theService
's storageresponse
is sent through the network (or we do somermc
stuff with it)Heavy parts:
Handler
so that there is noon_message(message)
but it's split into a number of functions dependent on which variant is themessage
Service
so thatmatch message
happens insidehandle_network_alert
and not inon_message
inHandler
(which no longer exists).This is done so that backup save can be triggered inside
Service
and not handler (it needs to happen only in a specific variant of message).