-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat: add key block hash to activities #1098
Conversation
lib/ae_mdw/activities.ex
Outdated
Enum.map_reduce(activities_locators_data, {nil, nil}, fn | ||
{{height, _txi, _local_idx}, _data} = locator, {height, enc_kb_hash} = kb_info -> | ||
{{enc_kb_hash, locator}, kb_info} | ||
|
||
{{height, _txi, _local_idx}, _data} = locator, _kb_info -> |
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.
If the accumulator won't be used it can be simplified with a Enum.map
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.
Could you double check the intention here? kb_info
is always a tuple of 2 elements and the locator
has the same format for both clauses matching always with the first one.
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.
solved by microblock inclusion
lib/ae_mdw/activities.ex
Outdated
|
||
%{ | ||
height: height, | ||
key_block_hash: key_block_hash, |
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.
Depending on the requirement for key block information, instead of key_block_hash
, or additionally to it, could be the block_hash
with the micro block like /txs
, to indicate the exact its location.
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.
This is a good idea, I'm going to implement it this way
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.
Done
No description provided.