docs(core,eth): fix typos #29024 #29036 (#2161)

This commit is contained in:
Daniel Liu 2026-03-17 13:45:29 +08:00 committed by GitHub
parent a9be217e6e
commit df8c94ce5b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 6 additions and 6 deletions

View file

@ -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

View file

@ -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 {

View file

@ -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 {

View file

@ -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{

View file

@ -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)

View file

@ -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.