Refactor DB Package to Enable Multiple Blocks/States at Slots (#2540)

* prefixed blocks blocked

* db refactor

* new historical state saving

* builds but tests fail

* more tests pass

* fix tests

* fix tests

* delete buf

* Update beacon-chain/db/block.go

Co-Authored-By: rauljordan <raul@prysmaticlabs.com>

* Update beacon-chain/db/block.go

Co-Authored-By: rauljordan <raul@prysmaticlabs.com>

* rem unused
This commit is contained in:
Raul Jordan
2019-05-09 10:42:12 -05:00
committed by GitHub
parent 7c47db0015
commit a4128f691b
21 changed files with 212 additions and 245 deletions

View File

@@ -177,11 +177,11 @@ func TestProcessingBlocks_SkippedSlots(t *testing.T) {
batchSize := 20
expectedSlot := params.BeaconConfig().GenesisSlot + uint64(batchSize)
ss.highestObservedSlot = expectedSlot
blk, err := ss.db.BlockBySlot(ctx, params.BeaconConfig().GenesisSlot)
blks, err := ss.db.BlocksBySlot(ctx, params.BeaconConfig().GenesisSlot)
if err != nil {
t.Fatalf("Unable to get genesis block %v", err)
}
h, err := hashutil.HashBeaconBlock(blk)
h, err := hashutil.HashBeaconBlock(blks[0])
if err != nil {
t.Fatalf("Unable to hash block %v", err)
}