diff --git a/cmd/geth/config.go b/cmd/geth/config.go index cdcbd31f1912..cc947f36902b 100644 --- a/cmd/geth/config.go +++ b/cmd/geth/config.go @@ -21,6 +21,14 @@ import ( "context" "errors" "fmt" + "math/big" + "os" + "reflect" + "time" + "unicode" + + "github.com/urfave/cli/v2" + "github.com/ethereum/go-ethereum/accounts/external" "github.com/ethereum/go-ethereum/accounts/keystore" "github.com/ethereum/go-ethereum/accounts/scwallet" @@ -41,12 +49,6 @@ import ( "github.com/ethereum/go-ethereum/statediff/indexer/interfaces" "github.com/ethereum/go-ethereum/statediff/indexer/shared" "github.com/naoina/toml" - "github.com/urfave/cli/v2" - "math/big" - "os" - "reflect" - "time" - "unicode" ) var ( diff --git a/statediff/indexer/ipld/eth_tx_test.go b/statediff/indexer/ipld/eth_tx_test.go index 5afa42234c31..8b459621e587 100644 --- a/statediff/indexer/ipld/eth_tx_test.go +++ b/statediff/indexer/ipld/eth_tx_test.go @@ -187,7 +187,6 @@ func TestEthTxResolve(t *testing.T) { t.Fatalf("error should be nil %v", gc) } } - } func TestEthTxTree(t *testing.T) { diff --git a/statediff/indexer/ipld/eth_tx_trie_test.go b/statediff/indexer/ipld/eth_tx_trie_test.go index 42637ceb41bd..b067d0ea4057 100644 --- a/statediff/indexer/ipld/eth_tx_trie_test.go +++ b/statediff/indexer/ipld/eth_tx_trie_test.go @@ -224,7 +224,6 @@ func TestTxTrieResolveBranch(t *testing.T) { if err != nil { t.Fatal("Error should be nil") } - } } diff --git a/statediff/known_gaps.go b/statediff/known_gaps.go index 33fe16b3a564..922eb6100a6e 100644 --- a/statediff/known_gaps.go +++ b/statediff/known_gaps.go @@ -139,7 +139,6 @@ func (kg *KnownGapsState) captureErrorBlocks(knownErrorBlocks []*big.Int) { log.Warn("The following Gaps were found", "knownErrorBlocks", knownErrorBlocks) log.Warn("Updating known Gaps table", "startErrorBlock", startErrorBlock, "endErrorBlock", endErrorBlock, "processingKey", kg.processingKey) kg.pushKnownGaps(startErrorBlock, endErrorBlock, false, kg.processingKey) - } // Users provide the latestBlockInDb and the latestBlockOnChain @@ -153,7 +152,6 @@ func isGap(latestBlockInDb *big.Int, latestBlockOnChain *big.Int, expectedDiffer return true } return false - } // This function will check for Gaps and update the DB if gaps are found. diff --git a/statediff/known_gaps_test.go b/statediff/known_gaps_test.go index ae06f1c9ca97..258bb887ab74 100644 --- a/statediff/known_gaps_test.go +++ b/statediff/known_gaps_test.go @@ -76,7 +76,6 @@ func testWriteToDb(t *testing.T, tests []gapValues, wipeDbBeforeStart bool) { validateUpsert(t, service, tc.knownErrorBlocksStart, tc.knownErrorBlocksEnd) } tearDown(t, db) - } // test writing blocks to file and then inserting them to DB @@ -166,7 +165,6 @@ func testFindAndUpdateGaps(t *testing.T, wipeDbBeforeStart bool) { startBlock.Add(latestBlockInDb, expectedDifference) endBlock.Sub(latestBlockOnChain, expectedDifference) validateUpsert(t, service, startBlock.Int64(), endBlock.Int64()) - } // test capturing missed blocks