mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-16 17:03:46 +00:00
minor fix
This commit is contained in:
parent
4867ce844d
commit
9957d9147f
1 changed files with 3 additions and 3 deletions
|
|
@ -110,7 +110,7 @@ func (s *Server) ChainSetHead(ctx context.Context, req *proto.ChainSetHeadReques
|
||||||
return &proto.ChainSetHeadResponse{}, nil
|
return &proto.ChainSetHeadResponse{}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func ConvertBlockToBlockStub(blocks []*types.Block) []*proto.BlockStub {
|
func convertBlockToBlockStub(blocks []*types.Block) []*proto.BlockStub {
|
||||||
|
|
||||||
var blockStubs []*proto.BlockStub
|
var blockStubs []*proto.BlockStub
|
||||||
|
|
||||||
|
|
@ -137,8 +137,8 @@ func (s *Server) ChainWatch(req *proto.ChainWatchRequest, reply proto.Bor_ChainW
|
||||||
msg := <-chain2HeadCh
|
msg := <-chain2HeadCh
|
||||||
|
|
||||||
err := reply.Send(&proto.ChainWatchResponse{Type: msg.Type,
|
err := reply.Send(&proto.ChainWatchResponse{Type: msg.Type,
|
||||||
Newchain: ConvertBlockToBlockStub(msg.NewChain),
|
Newchain: convertBlockToBlockStub(msg.NewChain),
|
||||||
Oldchain: ConvertBlockToBlockStub(msg.OldChain),
|
Oldchain: convertBlockToBlockStub(msg.OldChain),
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue