Skip to content

Commit 885bc36

Browse files
committed
eth,ethclient: Fix deprecated type usage, reinstate SA1019 lint
1 parent 12afea2 commit 885bc36

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

.golangci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,3 @@ issues:
7878
- 'SA1019: strings.Title is deprecated'
7979
- 'SA1019: strings.Title has been deprecated since Go 1.18 and an alternative has been available since Go 1.0: The rule Title uses for word boundaries does not handle Unicode punctuation properly. Use golang.org/x/text/cases instead.'
8080
- 'SA1029: should not use built-in type string as key for value'
81-
- 'SA1019:' # temporary, until fully updated to Go 1.21

eth/catalyst/superchain_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"testing"
55
"time"
66

7-
"github.com/ethereum/go-ethereum/eth/downloader"
87
"github.com/ethereum/go-ethereum/eth/ethconfig"
98
"github.com/ethereum/go-ethereum/node"
109
"github.com/ethereum/go-ethereum/params"
@@ -59,7 +58,7 @@ func TestSignalSuperchainV1Halt(t *testing.T) {
5958
for _, tc := range testCases {
6059
t.Run(tc.cfg+"_"+tc.bump, func(t *testing.T) {
6160
genesis, preMergeBlocks := generateMergeChain(2, false)
62-
ethcfg := &ethconfig.Config{Genesis: genesis, SyncMode: downloader.FullSync, TrieTimeout: time.Minute, TrieDirtyCache: 256, TrieCleanCache: 256}
61+
ethcfg := &ethconfig.Config{Genesis: genesis, SyncMode: ethconfig.FullSync, TrieTimeout: time.Minute, TrieDirtyCache: 256, TrieCleanCache: 256}
6362
ethcfg.RollupHaltOnIncompatibleProtocolVersion = tc.cfg // opt-in to halting (or not)
6463
n, ethservice := startEthServiceWithConfigFn(t, preMergeBlocks, ethcfg)
6564
defer n.Close() // close at the end, regardless of any prior (failed) closing

eth/tracers/api_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ func TestTraceTransactionHistorical(t *testing.T) {
636636
accounts := newAccounts(2)
637637
genesis := &core.Genesis{
638638
Config: params.OptimismTestConfig,
639-
Alloc: core.GenesisAlloc{
639+
Alloc: types.GenesisAlloc{
640640
accounts[0].addr: {Balance: big.NewInt(params.Ether)},
641641
accounts[1].addr: {Balance: big.NewInt(params.Ether)},
642642
},
@@ -781,7 +781,7 @@ func TestTraceBlockHistorical(t *testing.T) {
781781
accounts := newAccounts(3)
782782
genesis := &core.Genesis{
783783
Config: params.OptimismTestConfig,
784-
Alloc: core.GenesisAlloc{
784+
Alloc: types.GenesisAlloc{
785785
accounts[0].addr: {Balance: big.NewInt(params.Ether)},
786786
accounts[1].addr: {Balance: big.NewInt(params.Ether)},
787787
accounts[2].addr: {Balance: big.NewInt(params.Ether)},

ethclient/ethclient_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ var genesis = &core.Genesis{
8585

8686
var genesisForHistorical = &core.Genesis{
8787
Config: params.OptimismTestConfig,
88-
Alloc: core.GenesisAlloc{testAddr: {Balance: testBalance}},
88+
Alloc: types.GenesisAlloc{testAddr: {Balance: testBalance}},
8989
ExtraData: []byte("test genesis"),
9090
Timestamp: 9000,
9191
BaseFee: big.NewInt(params.InitialBaseFee),

0 commit comments

Comments
 (0)