core,eth,internal: fix typo (#29024)

This commit is contained in:
buddho 2024-02-20 19:42:48 +08:00 committed by GitHub
parent 7f5e96dc6c
commit bba3fa9af9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 8 additions and 8 deletions

View File

@ -24,7 +24,7 @@ import (
"github.com/ethereum/go-ethereum/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

@ -278,7 +278,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

@ -29,7 +29,7 @@ type MinerAPI struct {
e *Ethereum
}
// NewMinerAPI create a new MinerAPI instance.
// NewMinerAPI creates a new MinerAPI instance.
func NewMinerAPI(e *Ethereum) *MinerAPI {
return &MinerAPI{e}
}

View File

@ -38,7 +38,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.

View File

@ -92,7 +92,7 @@ type Peer struct {
lock sync.RWMutex // Mutex protecting the internal fields
}
// NewPeer create a wrapper for a network connection and negotiated protocol
// NewPeer creates a wrapper for a network connection and negotiated protocol
// version.
func NewPeer(version uint, p *p2p.Peer, rw p2p.MsgReadWriter, txpool TxPool) *Peer {
peer := &Peer{

View File

@ -33,7 +33,7 @@ type Peer struct {
logger log.Logger // Contextual logger with the peer id injected
}
// NewPeer create a wrapper for a network connection and negotiated protocol
// NewPeer creates a wrapper for a network connection and negotiated protocol
// version.
func NewPeer(version uint, p *p2p.Peer, rw p2p.MsgReadWriter) *Peer {
id := p.ID().String()
@ -46,7 +46,7 @@ func NewPeer(version uint, p *p2p.Peer, rw p2p.MsgReadWriter) *Peer {
}
}
// NewFakePeer create a fake snap peer without a backing p2p peer, for testing purposes.
// NewFakePeer creates a fake snap peer without a backing p2p peer, for testing purposes.
func NewFakePeer(version uint, id string, rw p2p.MsgReadWriter) *Peer {
return &Peer{
id: id,

View File

@ -288,7 +288,7 @@ type PersonalAccountAPI struct {
b Backend
}
// NewPersonalAccountAPI create a new PersonalAccountAPI.
// NewPersonalAccountAPI creates a new PersonalAccountAPI.
func NewPersonalAccountAPI(b Backend, nonceLock *AddrLocker) *PersonalAccountAPI {
return &PersonalAccountAPI{
am: b.AccountManager(),