-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
BEEFY consensus message scale classes #786
Conversation
…plemented scale reading. Introduced beefy consensus message processing in addBlockToTree() method (without implementation of the handler).
switch (format) { | ||
case BEEFY_CHANGED_AUTHORITIES -> { | ||
List<byte[]> authorityPublicKeys = new ListReader<>( | ||
rdr -> rdr.readByteArray(33)).read(reader); |
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.
can you create a constant for that 33, it feels like a magic number right now.
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.
Each digest is added separately in the header. This means we can have more than one digest per type. With the current implementation we use findFirst()
and that would not work. I suggest we rework the getBabeConsensusMessage
, getGrandpaConsensusMessage
, getBeefyConsensusMessage
so that they return a list of scale decoded messages instead of a single option.
…ore than one digest message from a type.
|
Description
Fixes #771