prysm-pulse/beacon-chain/rpc/statefetcher
kasey 1fa864cb1a
use slot:block index correctly (#10820)
* adding splitRoots, refactor to use it

* use splitRoots & work in roots only

the most common use case for this method is to get a list of
candidate roots and check if they are canonical. there isn't a great
reason to look up all the non-canonical blocks, because forkchoice
checks based on the root only, so just return roots and defer the
responsibility of resolving those to full blocks.

* update comment

* clean up shadowing

* more clear non-error return

* add test case for single root in index slot

* fmt

Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-06-07 16:47:42 +00:00
..
BUILD.bazel Move BeaconBlockNil Checker Function to Consensus-Types/Wrapper Package (#10731) 2022-05-20 23:29:16 +00:00
fetcher_test.go Config registry (#10683) 2022-05-20 07:16:53 +00:00
fetcher.go use slot:block index correctly (#10820) 2022-06-07 16:47:42 +00:00