Use DB to Fetch Justified Block (#2172)

* builds

* db tests in core

* spacing

* Gazelle

* fix lint

* iterative block root loop

* Update beacon-chain/core/blocks/block_operations_test.go

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

* imports
This commit is contained in:
Raul Jordan
2019-04-05 14:48:49 -05:00
committed by GitHub
parent 55ca5cc2c3
commit 60c254d818
31 changed files with 301 additions and 213 deletions

View File

@@ -9,7 +9,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/gogo/protobuf/proto"
peer "github.com/libp2p/go-libp2p-peer"
b "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks"
"github.com/prysmaticlabs/prysm/beacon-chain/core/genesis"
"github.com/prysmaticlabs/prysm/beacon-chain/db"
"github.com/prysmaticlabs/prysm/beacon-chain/internal"
pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
@@ -105,7 +105,7 @@ func setUpGenesisStateAndBlock(beaconDB *db.BeaconDB, t *testing.T) {
log.Errorf("unable to marshal the beacon state: %v", err)
return
}
genBlock := b.NewGenesisBlock(stateRoot[:])
genBlock := genesis.NewGenesisBlock(stateRoot[:])
if err := beaconDB.SaveBlock(genBlock); err != nil {
t.Fatalf("could not save genesis block to disk: %v", err)
}