diff --git a/eth/bor_api_backend.go b/eth/bor_api_backend.go index cfa9e74f72..d4cef2aec8 100644 --- a/eth/bor_api_backend.go +++ b/eth/bor_api_backend.go @@ -40,7 +40,7 @@ func (b *EthAPIBackend) GetRootHash(ctx context.Context, starBlockNr uint64, end return root, nil } -// GetRootHash returns root hash for given start and end block +// GetVoteOnHash returns the vote on hash func (b *EthAPIBackend) GetVoteOnHash(ctx context.Context, starBlockNr uint64, endBlockNr uint64, hash string, milestoneId string) (bool, error) { var api *bor.API fmt.Printf(">>>>> GetVoteOnHashApiBackend\n") diff --git a/eth/filters/IBackend.go b/eth/filters/IBackend.go index da2c51617a..c04f9b1d16 100644 --- a/eth/filters/IBackend.go +++ b/eth/filters/IBackend.go @@ -132,7 +132,7 @@ func (mr *MockBackendMockRecorder) GetBorBlockLogs(arg0, arg1 interface{}) *gomo // GetBorBlockReceipt mocks base method. func (m *MockBackend) GetBorBlockReceipt(arg0 context.Context, arg1 common.Hash) (*types.Receipt, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetBorBlockReceipt", arg0, arg1) + ret := m.ctrl.Call(m, "BorBlockReceipt", arg0, arg1) ret0, _ := ret[0].(*types.Receipt) ret1, _ := ret[1].(error) return ret0, ret1 @@ -141,7 +141,7 @@ func (m *MockBackend) GetBorBlockReceipt(arg0 context.Context, arg1 common.Hash) // GetBorBlockReceipt indicates an expected call of GetBorBlockReceipt. func (mr *MockBackendMockRecorder) GetBorBlockReceipt(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBorBlockReceipt", reflect.TypeOf((*MockBackend)(nil).GetBorBlockReceipt), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BorBlockReceipt", reflect.TypeOf((*MockBackend)(nil).GetBorBlockReceipt), arg0, arg1) } // GetLogs mocks base method. diff --git a/internal/cli/server/api_service.go b/internal/cli/server/api_service.go index bfd99fc7b9..c59fcf5187 100644 --- a/internal/cli/server/api_service.go +++ b/internal/cli/server/api_service.go @@ -39,8 +39,8 @@ func headerToProtoborHeader(h *types.Header) *protobor.Header { } } -func (s *Server) GetHeaderByNumber(ctx context.Context, req *protobor.GetHeaderByNumberRequest) (*protobor.GetHeaderByNumberResponse, error) { - fmt.Printf(">>>>> GetHeaderByNumber: %v\n", req) +func (s *Server) HeaderByNumber(ctx context.Context, req *protobor.GetHeaderByNumberRequest) (*protobor.GetHeaderByNumberResponse, error) { + fmt.Printf(">>>>> HeaderByNumber: %v\n", req) header, err := s.backend.APIBackend.HeaderByNumber(ctx, rpc.BlockNumber(req.Number)) if err != nil { return nil, err @@ -49,8 +49,8 @@ func (s *Server) GetHeaderByNumber(ctx context.Context, req *protobor.GetHeaderB return &protobor.GetHeaderByNumberResponse{Header: headerToProtoborHeader(header)}, nil } -func (s *Server) GetBlockByNumber(ctx context.Context, req *protobor.GetBlockByNumberRequest) (*protobor.GetBlockByNumberResponse, error) { - fmt.Printf(">>>>> GetBlockByNumber: %v\n", req) +func (s *Server) BlockByNumber(ctx context.Context, req *protobor.GetBlockByNumberRequest) (*protobor.GetBlockByNumberResponse, error) { + fmt.Printf(">>>>> BlockByNumber: %v\n", req) block, err := s.backend.APIBackend.BlockByNumber(ctx, rpc.BlockNumber(req.Number)) if err != nil { return nil, err @@ -65,8 +65,8 @@ func blockToProtoBlock(h *types.Block) *protobor.Block { } } -func (s *Server) GetTransactionReceipt(ctx context.Context, req *protobor.ReceiptRequest) (*protobor.ReceiptResponse, error) { - fmt.Printf(">>>>> GetTransactionReceipt: %v\n", req) +func (s *Server) TransactionReceipt(ctx context.Context, req *protobor.ReceiptRequest) (*protobor.ReceiptResponse, error) { + fmt.Printf(">>>>> TransactionReceipt: %v\n", req) _, blockHash, _, txnIndex, err := s.backend.APIBackend.GetTransaction(ctx, protoutil.ConvertH256ToHash(req.Hash)) if err != nil { return nil, err @@ -88,8 +88,8 @@ func (s *Server) GetTransactionReceipt(ctx context.Context, req *protobor.Receip return &protobor.ReceiptResponse{Receipt: ConvertReceiptToProtoReceipt(receipts[txnIndex])}, nil } -func (s *Server) GetBorBlockReceipt(ctx context.Context, req *protobor.ReceiptRequest) (*protobor.ReceiptResponse, error) { - fmt.Printf(">>>>> GetBorBlockReceipt: %v\n", req) +func (s *Server) BorBlockReceipt(ctx context.Context, req *protobor.ReceiptRequest) (*protobor.ReceiptResponse, error) { + fmt.Printf(">>>>> BorBlockReceipt: %v\n", req) receipt, err := s.backend.APIBackend.GetBorBlockReceipt(ctx, protoutil.ConvertH256ToHash(req.Hash)) if err != nil { return nil, err