Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix some problematic function names and typos in comment #2337

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions miner/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ type blockState struct {
txFeeRecipient common.Address
}

// prepareBlock intializes a new blockState that is ready to have transaction included to.
// prepareBlock initializes a new blockState that is ready to have transaction included to.
// Note that if blockState is not nil, blockState.close() needs to be called to shut down the state prefetcher.
func prepareBlock(w *worker) (*blockState, error) {
w.mu.RLock()
Expand Down Expand Up @@ -324,7 +324,7 @@ loop:

case errors.Is(err, core.ErrNonceTooHigh):
// Reorg notification data race between the transaction pool and miner, skip account =
log.Trace("Skipping account with hight nonce", "sender", from, "nonce", tx.Nonce())
log.Trace("Skipping account with high nonce", "sender", from, "nonce", tx.Nonce())
txs.Pop()

case errors.Is(err, core.ErrGasPriceDoesNotExceedMinimum):
Expand Down Expand Up @@ -384,7 +384,7 @@ loop:
return nil
}

// commitTransaction attempts to appply a single transaction. If the transaction fails, it's modifications are reverted.
// commitTransaction attempts to apply a single transaction. If the transaction fails, it's modifications are reverted.
func (b *blockState) commitTransaction(w *worker, tx *types.Transaction, txFeeRecipient common.Address) ([]*types.Log, error) {
snap := b.state.Snapshot()
vmRunner := w.chain.NewEVMRunner(b.header, b.state)
Expand Down
2 changes: 1 addition & 1 deletion miner/stress/1559/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func makeTransaction(nonce uint64, privKey *ecdsa.PrivateKey, signer types.Signe
// Generate eip 1559 transaction
recipient := crypto.PubkeyToAddress(privKey.PublicKey)

// Feecap and feetip are limited to 32 bytes. Offer a sightly
// Feecap and feetip are limited to 32 bytes. Offer a slightly
// larger buffer for creating both valid and invalid transactions.
var buf = make([]byte, 32+5)
rand.Read(buf)
Expand Down
2 changes: 1 addition & 1 deletion test/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func (a *Account) SendCeloTracked(ctx context.Context, recipient common.Address,
return node.Tracker.GetProcessedTx(tx.Hash()), nil
}

// SendCelo submits a transaction to `node` that invokes the equivalent of
// SendCeloViaGoldToken submits a transaction to `node` that invokes the equivalent of
// GoldToken.transfer(recipient, value), sent from the calling account.
// The submitted transaction is returned.
func (a *Account) SendCeloViaGoldToken(ctx context.Context, recipient common.Address, value int64, node *Node) (*types.Transaction, error) {
Expand Down
2 changes: 1 addition & 1 deletion trie/proof_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ func TestRangeProof(t *testing.T) {
}
}

// TestRangeProof tests normal range proof with two non-existent proofs.
// TestRangeProofWithNonExistentProof tests normal range proof with two non-existent proofs.
// The test cases are generated randomly.
func TestRangeProofWithNonExistentProof(t *testing.T) {
trie, vals := randomTrie(4096)
Expand Down
2 changes: 1 addition & 1 deletion trie/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ func (s *Sync) Missing(max int) (nodes []common.Hash, paths []SyncPath, codes []
}

// Process injects the received data for requested item. Note it can
// happpen that the single response commits two pending requests(e.g.
// happen that the single response commits two pending requests(e.g.
// there are two requests one for code and one for node but the hash
// is same). In this case the second response for the same hash will
// be treated as "non-requested" item or "already-processed" item but
Expand Down
Loading