From bcb4557e6e6746d4dffce08074b9278b4a6fa356 Mon Sep 17 00:00:00 2001 From: Daniel Liu <139250065@qq.com> Date: Tue, 10 Mar 2026 11:53:08 +0800 Subject: [PATCH] docs(core,eth): fix typos #29024 #29036 --- core/state/sync.go | 2 +- core/state_transition.go | 2 +- core/txpool/legacypool/legacypool.go | 2 +- core/txpool/legacypool/list.go | 2 +- eth/api_miner.go | 2 +- eth/downloader/api.go | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/state/sync.go b/core/state/sync.go index 77cfd146aeb8..2244c5e8de1f 100644 --- a/core/state/sync.go +++ b/core/state/sync.go @@ -26,7 +26,7 @@ import ( "github.com/XinFinOrg/XDPoSChain/trie" ) -// NewStateSync create a new state trie download scheduler. +// NewStateSync creates a new state trie download scheduler. func NewStateSync(root common.Hash, database ethdb.KeyValueReader, onLeaf func(keys [][]byte, leaf []byte) error, scheme string) *trie.Sync { // Register the storage slot callback if the external callback is specified. var onSlot func(keys [][]byte, path []byte, leaf []byte, parent common.Hash, parentPath []byte) error diff --git a/core/state_transition.go b/core/state_transition.go index 86befa6be147..f04a512f517d 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -60,7 +60,7 @@ func (result *ExecutionResult) Revert() []byte { } // IntrinsicGas computes the 'intrinsic gas' for a message with the given data. -func IntrinsicGas(data []byte, accessList types.AccessList, authList []types.SetCodeAuthorization, isContractCreation, isHomestead bool, isEIP3860 bool) (uint64, error) { +func IntrinsicGas(data []byte, accessList types.AccessList, authList []types.SetCodeAuthorization, isContractCreation, isHomestead, isEIP3860 bool) (uint64, error) { // Set the starting gas for the raw transaction var gas uint64 if isContractCreation && isHomestead { diff --git a/core/txpool/legacypool/legacypool.go b/core/txpool/legacypool/legacypool.go index f827f5d3cc61..65a5d59ae03d 100644 --- a/core/txpool/legacypool/legacypool.go +++ b/core/txpool/legacypool/legacypool.go @@ -343,7 +343,7 @@ func (pool *LegacyPool) Init(gasTip uint64, head *types.Header, reserver *txpool pool.gasTip.Store(uint256.NewInt(gasTip)) // Initialize the state with head block, or fallback to empty one in - // case the head state is not available(might occur when node is not + // case the head state is not available (might occur when node is not // fully synced). statedb, err := pool.chain.StateAt(head.Root) if err != nil { diff --git a/core/txpool/legacypool/list.go b/core/txpool/legacypool/list.go index 563c237a5ad9..0faad824d7a1 100644 --- a/core/txpool/legacypool/list.go +++ b/core/txpool/legacypool/list.go @@ -279,7 +279,7 @@ type list struct { totalcost *uint256.Int // Total cost of all transactions in the list } -// newList create a new transaction list for maintaining nonce-indexable fast, +// newList creates a new transaction list for maintaining nonce-indexable fast, // gapped, sortable transaction lists. func newList(strict bool) *list { return &list{ diff --git a/eth/api_miner.go b/eth/api_miner.go index d7c77d9589a0..f46ccf690de1 100644 --- a/eth/api_miner.go +++ b/eth/api_miner.go @@ -33,7 +33,7 @@ type MinerAPI struct { agent *miner.RemoteAgent } -// NewMinerAPI create a new RPC service which controls the miner of this node. +// NewMinerAPI creates a new RPC service which controls the miner of this node. func NewMinerAPI(e *Ethereum) *MinerAPI { agent := miner.NewRemoteAgent(e.BlockChain(), e.Engine()) e.Miner().Register(agent) diff --git a/eth/downloader/api.go b/eth/downloader/api.go index 6a9516400aaf..acae40141796 100644 --- a/eth/downloader/api.go +++ b/eth/downloader/api.go @@ -34,7 +34,7 @@ type DownloaderAPI struct { uninstallSyncSubscription chan *uninstallSyncSubscriptionRequest } -// NewDownloaderAPI create a new DownloaderAPI. The API has an internal event loop that +// NewDownloaderAPI creates a new DownloaderAPI. The API has an internal event loop that // listens for events from the downloader through the global event mux. In case it receives one of // these events it broadcasts it to all syncing subscriptions that are installed through the // installSyncSubscription channel.