chg: fix functions' names

This commit is contained in:
marcello33 2024-11-08 12:05:03 +01:00
parent 5d0d4fbbc5
commit af5c3275b2
No known key found for this signature in database
GPG key ID: 06128777E3C36B16
3 changed files with 11 additions and 11 deletions

View file

@ -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")

View file

@ -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.

View file

@ -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