Skip to content

Commit

Permalink
chore: typos (#10975)
Browse files Browse the repository at this point in the history
  • Loading branch information
chuwt authored Jul 2, 2024
1 parent fdc405e commit 67c52be
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cmd/state/exec3/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func (rw *Worker) RunTxTask(txTask *state.TxTask) {
rw.RunTxTaskNoLock(txTask)
}

// Needed to set hisotry reader when need to offset few txs from block beginning and does not break processing,
// Needed to set history reader when need to offset few txs from block beginning and does not break processing,
// like compute gas used for block and then to set state reader to continue processing on latest data.
func (rw *Worker) SetReader(reader state.ResettableStateReader) {
rw.stateReader = reader
Expand Down
2 changes: 1 addition & 1 deletion core/rawdb/accessors_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ func ReadBody(db kv.Getter, hash common.Hash, number uint64) (*types.Body, uint6
if bodyForStorage.TxCount < 2 {
panic(fmt.Sprintf("block body hash too few txs amount: %d, %d", number, bodyForStorage.TxCount))
}
return body, bodyForStorage.BaseTxnID.First(), bodyForStorage.TxCount - 2 // 1 system txn in the begining of block, and 1 at the end
return body, bodyForStorage.BaseTxnID.First(), bodyForStorage.TxCount - 2 // 1 system txn in the beginning of block, and 1 at the end
}

func HasSenders(db kv.Getter, hash common.Hash, number uint64) (bool, error) {
Expand Down
2 changes: 1 addition & 1 deletion erigon-lib/kv/tables.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ const (
BittorrentCompletion = "BittorrentCompletion"
BittorrentInfo = "BittorrentInfo"

// Domains/Histry/InvertedIndices
// Domains/History/InvertedIndices
// Contants have "Tbl" prefix, to avoid collision with actual Domain names
// This constants is very rarely used in APP, but Domain/History/Idx names are widely used
TblAccountKeys = "AccountKeys"
Expand Down
2 changes: 1 addition & 1 deletion erigon-lib/state/domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -1258,7 +1258,7 @@ func (dt *DomainRoTx) Unwind(ctx context.Context, rwTx kv.RwTx, step, txNumUnwin
key, value, prevStepBytes := domainDiffs[i].Key, domainDiffs[i].Value, domainDiffs[i].PrevStepBytes
// First, we need to evict from the keysCursor all keys that have a too high step
fullKey := key[:len(key)-8]
// so stepBytes is ^step so we need to iterate from the begining down until we find the stepBytes
// so stepBytes is ^step so we need to iterate from the beginning down until we find the stepBytes
for k, v, err := keysCursor.SeekExact(fullKey); k != nil; k, v, err = keysCursor.NextDup() {
if err != nil {
return fmt.Errorf("iterate over %s domain keys: %w", d.filenameBase, err)
Expand Down
4 changes: 2 additions & 2 deletions tests/solidity/contracts/OpCodes.sol
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ contract OpCodes {

assembly {
let x := mload(0x40) //Find empty storage location using "free memory pointer"
mstore(x,sig) //Place signature at begining of empty storage
mstore(x,sig) //Place signature at beginning of empty storage
mstore(add(x,0x04),a) // first address parameter. just after signature
mstore(add(x,0x24),a) // 2nd address parameter - first padded. add 32 bytes (not 20 bytes)
mstore(0x40,add(x,0x64)) // this is missing in other examples. Set free pointer before function call. so it is used by called function.
Expand Down Expand Up @@ -244,7 +244,7 @@ contract OpCodes {
//delegatecall
assembly {
let x := mload(0x40) //Find empty storage location using "free memory pointer"
mstore(x,sig) //Place signature at begining of empty storage
mstore(x,sig) //Place signature at beginning of empty storage
mstore(add(x,0x04),a) // first address parameter. just after signature
mstore(add(x,0x24),a) // 2nd address parameter - first padded. add 32 bytes (not 20 bytes)
mstore(0x40,add(x,0x64)) // this is missing in other examples. Set free pointer before function call. so it is used by called function.
Expand Down
4 changes: 2 additions & 2 deletions turbo/rpchelper/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func CreateHistoryStateReader(tx kv.Tx, blockNumber uint64, txnIndex int, chainN
if err != nil {
return nil, err
}
r.SetTxNum(uint64(int(minTxNum) + txnIndex + /* 1 system txNum in begining of block */ 1))
r.SetTxNum(uint64(int(minTxNum) + txnIndex + /* 1 system txNum in beginning of block */ 1))
return r, nil
}

Expand All @@ -164,7 +164,7 @@ func NewLatestStateWriter(txc wrap.TxContainer, blockNum uint64) state.StateWrit
if err != nil {
panic(err)
}
domains.SetTxNum(uint64(int(minTxNum) + /* 1 system txNum in begining of block */ 1))
domains.SetTxNum(uint64(int(minTxNum) + /* 1 system txNum in beginning of block */ 1))
return state.NewWriterV4(domains)
}

Expand Down

0 comments on commit 67c52be

Please sign in to comment.