prysm-pulse/beacon-chain/db/iface
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 Rename Block Package in Consensus-Types to Interfaces (#10605) 2022-05-02 14:32:37 -04:00
errors.go Embedded mainnet genesis state + load genesis.ssz from file (#8614) 2021-03-18 21:00:00 +00:00
interface.go use slot:block index correctly (#10820) 2022-06-07 16:47:42 +00:00