mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 23:48:06 -05:00
Rename Block Package in Consensus-Types to Interfaces (#10605)
* interfaces package * builds * gaz
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
p2pTypes "github.com/prysmaticlabs/prysm/beacon-chain/p2p/types"
|
||||
"github.com/prysmaticlabs/prysm/cmd/beacon-chain/flags"
|
||||
"github.com/prysmaticlabs/prysm/config/params"
|
||||
"github.com/prysmaticlabs/prysm/consensus-types/block"
|
||||
"github.com/prysmaticlabs/prysm/consensus-types/interfaces"
|
||||
types "github.com/prysmaticlabs/prysm/consensus-types/primitives"
|
||||
"github.com/prysmaticlabs/prysm/encoding/bytesutil"
|
||||
p2ppb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1"
|
||||
@@ -24,7 +24,7 @@ import (
|
||||
// either in DB or initial sync cache.
|
||||
type forkData struct {
|
||||
peer peer.ID
|
||||
blocks []block.SignedBeaconBlock
|
||||
blocks []interfaces.SignedBeaconBlock
|
||||
}
|
||||
|
||||
// nonSkippedSlotAfter checks slots after the given one in an attempt to find a non-empty future slot.
|
||||
@@ -257,8 +257,8 @@ func (f *blocksFetcher) findForkWithPeer(ctx context.Context, pid peer.ID, slot
|
||||
}
|
||||
|
||||
// findAncestor tries to figure out common ancestor slot that connects a given root to known block.
|
||||
func (f *blocksFetcher) findAncestor(ctx context.Context, pid peer.ID, b block.SignedBeaconBlock) (*forkData, error) {
|
||||
outBlocks := []block.SignedBeaconBlock{b}
|
||||
func (f *blocksFetcher) findAncestor(ctx context.Context, pid peer.ID, b interfaces.SignedBeaconBlock) (*forkData, error) {
|
||||
outBlocks := []interfaces.SignedBeaconBlock{b}
|
||||
for i := uint64(0); i < backtrackingMaxHops; i++ {
|
||||
parentRoot := bytesutil.ToBytes32(outBlocks[len(outBlocks)-1].Block().ParentRoot())
|
||||
if f.db.HasBlock(ctx, parentRoot) || f.chain.HasInitSyncBlock(parentRoot) {
|
||||
|
||||
Reference in New Issue
Block a user