-
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-blocks/:hash_or_kbi/micro-blocks endpoint #896
Conversation
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.
Looks good to me. Just two cleanup minors.
with_mocks [ | ||
{:aec_chain, [], [get_block: fn ^decoded_hash -> :error end]} | ||
] do |
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.
Possibly not needed
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.
It's needed because the fetch_key_block_micro_blocks
function will check for the hash existing by using :aec_chain.get_block(kb_hash)
lib/ae_mdw/blocks.ex
Outdated
{{height, 0}, {height, Util.max_256bit_int()}}, | ||
cursor | ||
) | ||
|> Stream.take_while(&match?({^height, _mbi}, &1)) |
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.
key boundary should cover this match
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
5e6a387
to
f960765
Compare
f960765
to
fba3ab6
Compare
refs #888
requires #895 to be merged first