mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 23:48:06 -05:00
Refactor ChainService for Receiving Blocks Synchronously (#1984)
* refactor chain service * restructure service and lint * all calls to receive block in chain service are now blocking * begin fixing tests * refactored blockchain tests * builds correctly * blockchain tests pass again * lint * sync and rpc tests pass again * done * add in open tracing * span in fork choice * Update beacon-chain/blockchain/block_processing.go Co-Authored-By: rauljordan <raul@prysmaticlabs.com>
This commit is contained in:
@@ -53,8 +53,12 @@ func (ms *mockSyncService) ResumeSync() {
|
||||
|
||||
type mockChainService struct{}
|
||||
|
||||
func (ms *mockChainService) IncomingBlockFeed() *event.Feed {
|
||||
return &event.Feed{}
|
||||
func (m *mockChainService) ReceiveBlock(ctx context.Context, block *pb.BeaconBlock) (*pb.BeaconState, error) {
|
||||
return &pb.BeaconState{}, nil
|
||||
}
|
||||
|
||||
func (m *mockChainService) ApplyForkChoiceRule(ctx context.Context, block *pb.BeaconBlock, computedState *pb.BeaconState) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func setUpGenesisStateAndBlock(beaconDB *db.BeaconDB, t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user