prysm-pulse/beacon-chain/db
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
..
filters Remove Eth2-Types Dependency in Prysm (#10578) 2022-04-29 10:32:11 -04:00
iface use slot:block index correctly (#10820) 2022-06-07 16:47:42 +00:00
kv use slot:block index correctly (#10820) 2022-06-07 16:47:42 +00:00
slasherkv Remove Eth2-Types Dependency in Prysm (#10578) 2022-04-29 10:32:11 -04:00
testing Slasher Simulator Code for Testing Optimized Slasher Behavior (#9695) 2021-09-29 02:27:21 +00:00
alias.go Reduce Usage of Eth2 Terminology in Prysm (#9104) 2021-06-26 19:00:33 +00:00
BUILD.bazel Move Consensus Type Wrappers Into Consensus Types Package (#10598) 2022-05-02 15:43:40 +00:00
db_test.go Verify interface compliance using typed nil instead of dereferencing and conversion (#7489) 2020-10-10 00:36:48 +00:00
db.go Reduce Usage of Eth2 Terminology in Prysm (#9104) 2021-06-26 19:00:33 +00:00
errors.go Clean up various warnings (#10710) 2022-05-19 04:38:04 +00:00
log.go Unify the pattern of using a package-level logger (#8245) 2021-01-11 20:03:28 +00:00
restore_test.go Move Consensus Type Wrappers Into Consensus Types Package (#10598) 2022-05-02 15:43:40 +00:00
restore.go Miscellaneous Packages from Shared Into Proper Folders (#9638) 2021-09-21 18:11:16 +00:00