Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

replace get_block with get_block_header_state #582

Merged
merged 2 commits into from
Aug 14, 2019

Conversation

UMU618
Copy link
Contributor

@UMU618 UMU618 commented Aug 14, 2019

Improve #581

@c0d3ster c0d3ster merged commit 11fbd89 into EOSIO:develop Aug 14, 2019
@mmcs85
Copy link

mmcs85 commented Aug 15, 2019

Hey there guys I want to say this improvement is great! I though about using get_block_header_state before but didn't know how to extract the prefix.

There is a constraint though when using it.
get_block_header_state does not return blocks before the LIB.
(nodeos prob fetching from reversible blocks database)

{"code":400,"message":"Unknown Block","error":{"code":3100002,"name":"unknown_block_exception","what":"Unknown block","details":[{"message":"Could not find reversible block: 44517609","file":"chain_plugin.cpp","line_number":1875,"method":"get_block_header_state"}]}}

Meaning that this will fail for 2 cases:
1 - local testnets with 1 producer "eosio" that the LIB distance between the Head is 1 block. The reason is prob that the fetch is slower than the info is on nodeos tables.
2 - blocksBehind > 300 blocks

I have implemented in eos-sharp a fallback to get_block for those cases here:
https://github.com/GetScatter/eos-sharp/blob/master/EosSharp/EosSharp.Core/EosBase.cs#L409
Keep it up!

@tbfleming
Copy link
Contributor

Dang it. @c0d3ster we'll have to add a fallback or revert the change.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants