From 231255f026eff24592106e88bcdb6c241da87f84 Mon Sep 17 00:00:00 2001
From: Enrique Jose  Avila Asapche <eavilaasapche@gmail.com>
Date: Tue, 22 Feb 2022 01:42:23 +0000
Subject: [PATCH] correct naming (#3563)

---
 cmd/rpcdaemon/README.md                 |  2 +-
 cmd/rpcdaemon/commands/erigon_api.go    |  2 +-
 cmd/rpcdaemon/commands/erigon_block.go  |  2 +-
 cmd/rpcdaemon/commands/eth_call_test.go | 16 ++++++++--------
 4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/cmd/rpcdaemon/README.md b/cmd/rpcdaemon/README.md
index 76e1c56d10..0ce023e134 100644
--- a/cmd/rpcdaemon/README.md
+++ b/cmd/rpcdaemon/README.md
@@ -269,7 +269,7 @@ The following table shows the current implementation status of Erigon's RPC daem
 | erigon_getLogsByHash                       | Yes     | Erigon only                                |
 | erigon_forks                               | Yes     | Erigon only                                |
 | erigon_issuance                            | Yes     | Erigon only                                |
-| erigon_getBlockByTimeStamp                 | Yes     | Erigon only                                |
+| erigon_GetBlockByTimestamp                 | Yes     | Erigon only                                |
 |                                            |         |                                            |
 | starknet_call                              | Yes     | Starknet only                              |
 |                                            |         |                                            |
diff --git a/cmd/rpcdaemon/commands/erigon_api.go b/cmd/rpcdaemon/commands/erigon_api.go
index 5a5254d1d2..864eaf6d33 100644
--- a/cmd/rpcdaemon/commands/erigon_api.go
+++ b/cmd/rpcdaemon/commands/erigon_api.go
@@ -19,7 +19,7 @@ type ErigonAPI interface {
 	// Blocks related (see ./erigon_blocks.go)
 	GetHeaderByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Header, error)
 	GetHeaderByHash(_ context.Context, hash common.Hash) (*types.Header, error)
-	GetBlockByTimeStamp(ctx context.Context, timeStamp uint64, fullTx bool) (map[string]interface{}, error)
+	GetBlockByTimestamp(ctx context.Context, timeStamp uint64, fullTx bool) (map[string]interface{}, error)
 
 	// Receipt related (see ./erigon_receipts.go)
 	GetLogsByHash(ctx context.Context, hash common.Hash) ([][]*types.Log, error)
diff --git a/cmd/rpcdaemon/commands/erigon_block.go b/cmd/rpcdaemon/commands/erigon_block.go
index eaac6eec23..b8aaf26045 100644
--- a/cmd/rpcdaemon/commands/erigon_block.go
+++ b/cmd/rpcdaemon/commands/erigon_block.go
@@ -62,7 +62,7 @@ func (api *ErigonImpl) GetHeaderByHash(ctx context.Context, hash common.Hash) (*
 	return header, nil
 }
 
-func (api *ErigonImpl) GetBlockByTimeStamp(ctx context.Context, timeStamp uint64, fullTx bool) (map[string]interface{}, error) {
+func (api *ErigonImpl) GetBlockByTimestamp(ctx context.Context, timeStamp uint64, fullTx bool) (map[string]interface{}, error) {
 	tx, err := api.db.BeginRo(ctx)
 	if err != nil {
 		return nil, err
diff --git a/cmd/rpcdaemon/commands/eth_call_test.go b/cmd/rpcdaemon/commands/eth_call_test.go
index 74d0f78bb4..d156cf2bf5 100644
--- a/cmd/rpcdaemon/commands/eth_call_test.go
+++ b/cmd/rpcdaemon/commands/eth_call_test.go
@@ -44,7 +44,7 @@ func TestEthCallNonCanonical(t *testing.T) {
 	}
 }
 
-func TestGetBlockByTimeStampLatestTime(t *testing.T) {
+func TestGetBlockByTimestampLatestTime(t *testing.T) {
 	ctx := context.Background()
 	db := rpcdaemontest.CreateTestKV(t)
 
@@ -71,7 +71,7 @@ func TestGetBlockByTimeStampLatestTime(t *testing.T) {
 		}
 	}
 
-	block, err := api.GetBlockByTimeStamp(ctx, latestBlock.Header().Time, false)
+	block, err := api.GetBlockByTimestamp(ctx, latestBlock.Header().Time, false)
 	if err != nil {
 		t.Errorf("couldn't retrieve block %v", err)
 	}
@@ -81,7 +81,7 @@ func TestGetBlockByTimeStampLatestTime(t *testing.T) {
 	}
 }
 
-func TestGetBlockByTimeStampOldestTime(t *testing.T) {
+func TestGetBlockByTimestampOldestTime(t *testing.T) {
 	ctx := context.Background()
 	db := rpcdaemontest.CreateTestKV(t)
 
@@ -112,7 +112,7 @@ func TestGetBlockByTimeStampOldestTime(t *testing.T) {
 		}
 	}
 
-	block, err := api.GetBlockByTimeStamp(ctx, oldestBlock.Header().Time, false)
+	block, err := api.GetBlockByTimestamp(ctx, oldestBlock.Header().Time, false)
 	if err != nil {
 		t.Errorf("couldn't retrieve block %v", err)
 	}
@@ -150,7 +150,7 @@ func TestGetBlockByTimeHigherThanLatestBlock(t *testing.T) {
 		}
 	}
 
-	block, err := api.GetBlockByTimeStamp(ctx, latestBlock.Header().Time+999999999999, false)
+	block, err := api.GetBlockByTimestamp(ctx, latestBlock.Header().Time+999999999999, false)
 	if err != nil {
 		t.Errorf("couldn't retrieve block %v", err)
 	}
@@ -195,7 +195,7 @@ func TestGetBlockByTimeMiddle(t *testing.T) {
 		}
 	}
 
-	block, err := api.GetBlockByTimeStamp(ctx, middleBlock.Header().Time, false)
+	block, err := api.GetBlockByTimestamp(ctx, middleBlock.Header().Time, false)
 	if err != nil {
 		t.Errorf("couldn't retrieve block %v", err)
 	}
@@ -205,7 +205,7 @@ func TestGetBlockByTimeMiddle(t *testing.T) {
 	}
 }
 
-func TestGetBlockByTimeStamp(t *testing.T) {
+func TestGetBlockByTimestamp(t *testing.T) {
 	ctx := context.Background()
 	db := rpcdaemontest.CreateTestKV(t)
 
@@ -240,7 +240,7 @@ func TestGetBlockByTimeStamp(t *testing.T) {
 		}
 	}
 
-	block, err := api.GetBlockByTimeStamp(ctx, pickedBlock.Header().Time, false)
+	block, err := api.GetBlockByTimestamp(ctx, pickedBlock.Header().Time, false)
 	if err != nil {
 		t.Errorf("couldn't retrieve block %v", err)
 	}
-- 
GitLab