From 267222d4a5c4f26482001d497f7bc06979fd3489 Mon Sep 17 00:00:00 2001 From: wit liu <765765346@qq.com> Date: Sun, 4 Jan 2026 19:52:26 +0800 Subject: [PATCH] all: fix goimports warning (#1903) --- common/types.go | 18 +++++++++--------- internal/ethapi/transaction_args.go | 26 +++++++++++++------------- p2p/discv5/database.go | 10 +++++----- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/common/types.go b/common/types.go index 60794037bf..d61f63acc6 100644 --- a/common/types.go +++ b/common/types.go @@ -31,15 +31,15 @@ import ( ) const ( - HashLength = 32 - AddressLength = 20 - VoteMethod = "0x6dd7d8ea" - UnvoteMethod = "0x02aa9be2" - ProposeMethod = "0x01267951" - ResignMethod = "0xae6e43f5" - SignMethod = "0xe341eaa4" - XDCXApplyMethod = "0xc6b32f34" - XDCZApplyMethod = "0xc6b32f34" + HashLength = 32 + AddressLength = 20 + VoteMethod = "0x6dd7d8ea" + UnvoteMethod = "0x02aa9be2" + ProposeMethod = "0x01267951" + ResignMethod = "0xae6e43f5" + SignMethod = "0xe341eaa4" + XDCXApplyMethod = "0xc6b32f34" + XDCZApplyMethod = "0xc6b32f34" ) var ( diff --git a/internal/ethapi/transaction_args.go b/internal/ethapi/transaction_args.go index 64ec0aeb28..9c5520bcff 100644 --- a/internal/ethapi/transaction_args.go +++ b/internal/ethapi/transaction_args.go @@ -334,19 +334,19 @@ func (args *TransactionArgs) ToMessage(b AccountBackend, baseFee *big.Int, skipN } } return &core.Message{ - From: addr, - To: args.To, - Value: (*big.Int)(args.Value), - Nonce: uint64(*args.Nonce), - GasLimit: uint64(*args.Gas), - GasPrice: gasPrice, - GasFeeCap: gasFeeCap, - GasTipCap: gasTipCap, - Data: args.data(), - AccessList: accessList, - SetCodeAuthorizations: args.AuthorizationList, - SkipNonceChecks: skipNonceCheck, - SkipFromEOACheck: skipEoACheck, + From: addr, + To: args.To, + Value: (*big.Int)(args.Value), + Nonce: uint64(*args.Nonce), + GasLimit: uint64(*args.Gas), + GasPrice: gasPrice, + GasFeeCap: gasFeeCap, + GasTipCap: gasTipCap, + Data: args.data(), + AccessList: accessList, + SetCodeAuthorizations: args.AuthorizationList, + SkipNonceChecks: skipNonceCheck, + SkipFromEOACheck: skipEoACheck, } } diff --git a/p2p/discv5/database.go b/p2p/discv5/database.go index 149fd926f3..64356f1e6d 100644 --- a/p2p/discv5/database.go +++ b/p2p/discv5/database.go @@ -58,11 +58,11 @@ var ( nodeDBVersionKey = []byte("version") // Version of the database to flush if changes nodeDBItemPrefix = []byte("n:") // Identifier to prefix node entries with - nodeDBDiscoverRoot = ":discover" - nodeDBDiscoverPing = nodeDBDiscoverRoot + ":lastping" - nodeDBDiscoverPong = nodeDBDiscoverRoot + ":lastpong" - nodeDBDiscoverFindFails = nodeDBDiscoverRoot + ":findfail" - nodeDBTopicRegTickets = ":tickets" + nodeDBDiscoverRoot = ":discover" + nodeDBDiscoverPing = nodeDBDiscoverRoot + ":lastping" + nodeDBDiscoverPong = nodeDBDiscoverRoot + ":lastpong" + nodeDBDiscoverFindFails = nodeDBDiscoverRoot + ":findfail" + nodeDBTopicRegTickets = ":tickets" ) // newNodeDB creates a new node database for storing and retrieving infos about