mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 23:18:15 -05:00
Added db.BlocksBySlot and db.BlockRootsBySlot (#8184)
* Added blockBySlot and blockRootBySlot * Changed to BlocksBySlot and BlockRootsBySlot * Updated to use BlocksBySlot and BlockRootsBySlot * Added missing passthrough to karfa exporter * Return hasBlocks/hasBlockRoots in the new getters * Fixed CI lint * Replace call to bytes.Compare with bytes.Equal * Reordered the returns of the new getters Co-authored-by: Nishant Das <nishdas93@gmail.com> Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
This commit is contained in:
@@ -69,8 +69,7 @@ func main() {
|
||||
// If the state is not available, roll back
|
||||
for state == nil {
|
||||
slot--
|
||||
filter := filters.NewFilter().SetStartSlot(slot).SetEndSlot(slot)
|
||||
rts, err := db.BlockRoots(context.Background(), filter)
|
||||
_, rts, err := db.BlockRootsBySlot(context.Background(), slot)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user