Commit 2d6cdaf3 authored by Roman Dovgan's avatar Roman Dovgan Committed by GitHub

Fixed typos (#9634)

Co-authored-by: default avatarsmartcontracts <kelvin@optimism.io>
parent 9eb5f880
...@@ -47,7 +47,7 @@ func (w jsonAggregateReaderWriter) readAggregate(f string) (aggregate, error) { ...@@ -47,7 +47,7 @@ func (w jsonAggregateReaderWriter) readAggregate(f string) (aggregate, error) {
type gobAggregateReaderWriter struct{} type gobAggregateReaderWriter struct{}
// writeAggregate writes the aggregate to a file in gob format // writeAggregate writes the aggregate to a file in gob format
// if the output file is not specified, it will creeate a file based on the block range // if the output file is not specified, it will create a file based on the block range
func (w gobAggregateReaderWriter) writeAggregate(a aggregate, o string) error { func (w gobAggregateReaderWriter) writeAggregate(a aggregate, o string) error {
if o == "" { if o == "" {
o = fmt.Sprintf("%d.%d-%d.gob", a.ChainID, a.First, a.Last) o = fmt.Sprintf("%d.%d-%d.gob", a.ChainID, a.First, a.Last)
......
...@@ -70,8 +70,8 @@ func TestBatchAddCallFinalizeWithdrawalTransaction(t *testing.T) { ...@@ -70,8 +70,8 @@ func TestBatchAddCallFinalizeWithdrawalTransaction(t *testing.T) {
require.JSONEq(t, string(expected), string(serialized)) require.JSONEq(t, string(expected), string(serialized))
} }
// TestBatchAddCallDespostTransaction ensures that simple calls can be serialized correctly. // TestBatchAddCallDepositTransaction ensures that simple calls can be serialized correctly.
func TestBatchAddCallDespositTransaction(t *testing.T) { func TestBatchAddCallDepositTransaction(t *testing.T) {
file, err := os.ReadFile("testdata/portal-abi.json") file, err := os.ReadFile("testdata/portal-abi.json")
require.NoError(t, err) require.NoError(t, err)
portalABI, err := abi.JSON(bytes.NewReader(file)) portalABI, err := abi.JSON(bytes.NewReader(file))
......
...@@ -576,7 +576,7 @@ func (oc *OpConductor) action() { ...@@ -576,7 +576,7 @@ func (oc *OpConductor) action() {
break break
} }
// 2. we're here becasuse an healthy leader became unhealthy itself // 2. we're here because an healthy leader became unhealthy itself
// then we should try to stop sequencing locally and transfer leadership. // then we should try to stop sequencing locally and transfer leadership.
var result *multierror.Error var result *multierror.Error
// Try to stop sequencer first, but since sequencer is not healthy, we may not be able to stop it. // Try to stop sequencer first, but since sequencer is not healthy, we may not be able to stop it.
......
...@@ -40,13 +40,13 @@ type SimpleAsyncGossiper struct { ...@@ -40,13 +40,13 @@ type SimpleAsyncGossiper struct {
} }
// To avoid import cycles, we define a new Network interface here // To avoid import cycles, we define a new Network interface here
// this interface is compatable with driver.Network // this interface is compatible with driver.Network
type Network interface { type Network interface {
PublishL2Payload(ctx context.Context, payload *eth.ExecutionPayloadEnvelope) error PublishL2Payload(ctx context.Context, payload *eth.ExecutionPayloadEnvelope) error
} }
// To avoid import cycles, we define a new Metrics interface here // To avoid import cycles, we define a new Metrics interface here
// this interface is compatable with driver.Metrics // this interface is compatible with driver.Metrics
type Metrics interface { type Metrics interface {
RecordPublishingError() RecordPublishingError()
} }
......
...@@ -107,7 +107,7 @@ func mismatchedParentHashArgs() args { ...@@ -107,7 +107,7 @@ func mismatchedParentHashArgs() args {
return args return args
} }
func createMistmatchedPrevRandao() args { func createMismatchedPrevRandao() args {
args := ecotoneArgs() args := ecotoneArgs()
args.attrs.PrevRandao = eth.Bytes32(common.HexToHash("0xabc")) args.attrs.PrevRandao = eth.Bytes32(common.HexToHash("0xabc"))
return args return args
...@@ -126,7 +126,7 @@ func createNilGasLimit() args { ...@@ -126,7 +126,7 @@ func createNilGasLimit() args {
return args return args
} }
func createMistmatchedTimestamp() args { func createMismatchedTimestamp() args {
args := ecotoneArgs() args := ecotoneArgs()
val := eth.Uint64Quantity(2000) val := eth.Uint64Quantity(2000)
args.attrs.Timestamp = val args.attrs.Timestamp = val
...@@ -178,7 +178,7 @@ func TestAttributesMatch(t *testing.T) { ...@@ -178,7 +178,7 @@ func TestAttributesMatch(t *testing.T) {
}, },
{ {
shouldMatch: false, shouldMatch: false,
args: createMistmatchedPrevRandao(), args: createMismatchedPrevRandao(),
}, },
{ {
shouldMatch: false, shouldMatch: false,
...@@ -190,7 +190,7 @@ func TestAttributesMatch(t *testing.T) { ...@@ -190,7 +190,7 @@ func TestAttributesMatch(t *testing.T) {
}, },
{ {
shouldMatch: false, shouldMatch: false,
args: createMistmatchedTimestamp(), args: createMismatchedTimestamp(),
}, },
} }
......
...@@ -224,7 +224,7 @@ func randomFrame(rng *rand.Rand, opts ...frameOpt) *Frame { ...@@ -224,7 +224,7 @@ func randomFrame(rng *rand.Rand, opts ...frameOpt) *Frame {
IsLast: testutils.RandomBool(rng), IsLast: testutils.RandomBool(rng),
} }
// evaulaute options // evaluate options
for _, opt := range opts { for _, opt := range opts {
opt(rng, frame) opt(rng, frame)
} }
......
...@@ -80,7 +80,7 @@ func TestManualABIPacking(t *testing.T) { ...@@ -80,7 +80,7 @@ func TestManualABIPacking(t *testing.T) {
txData, err := proposeL2OutputTxData(l2ooAbi, output) txData, err := proposeL2OutputTxData(l2ooAbi, output)
require.NoError(t, err) require.NoError(t, err)
// set a gas limit to disable gas estimation. The invariantes that the L2OO tries to uphold // set a gas limit to disable gas estimation. The invariants that the L2OO tries to uphold
// are not maintained in this test. // are not maintained in this test.
opts.GasLimit = 100_000 opts.GasLimit = 100_000
tx, err := l2oo.ProposeL2Output( tx, err := l2oo.ProposeL2Output(
......
...@@ -427,7 +427,7 @@ func TestMarshalUnmarshalExecutionPayloadEnvelopes(t *testing.T) { ...@@ -427,7 +427,7 @@ func TestMarshalUnmarshalExecutionPayloadEnvelopes(t *testing.T) {
ExecutionPayload: createPayloadWithWithdrawals(&types.Withdrawals{}), ExecutionPayload: createPayloadWithWithdrawals(&types.Withdrawals{}),
} }
missingExecutionPaylaod := &ExecutionPayloadEnvelope{ missingExecutionPayload := &ExecutionPayloadEnvelope{
ParentBeaconBlockRoot: &hash, ParentBeaconBlockRoot: &hash,
ExecutionPayload: nil, ExecutionPayload: nil,
} }
...@@ -439,7 +439,7 @@ func TestMarshalUnmarshalExecutionPayloadEnvelopes(t *testing.T) { ...@@ -439,7 +439,7 @@ func TestMarshalUnmarshalExecutionPayloadEnvelopes(t *testing.T) {
}{ }{
{"ValidInputSucceeds", validInput, nil}, {"ValidInputSucceeds", validInput, nil},
{"MissingHashFailsToSerialize", missingHash, ErrMissingData}, {"MissingHashFailsToSerialize", missingHash, ErrMissingData},
{"MissingExecutionDataFailsToSerialize", missingExecutionPaylaod, ErrMissingData}, {"MissingExecutionDataFailsToSerialize", missingExecutionPayload, ErrMissingData},
} }
for _, test := range tests { for _, test := range tests {
......
...@@ -305,7 +305,7 @@ func (*mockBackend) ChainID(ctx context.Context) (*big.Int, error) { ...@@ -305,7 +305,7 @@ func (*mockBackend) ChainID(ctx context.Context) (*big.Int, error) {
// TransactionReceipt queries the mockBackend for a mined txHash. If none is found, nil is returned // TransactionReceipt queries the mockBackend for a mined txHash. If none is found, nil is returned
// for both return values. Otherwise, it returns a receipt containing the txHash, the gasFeeCap // for both return values. Otherwise, it returns a receipt containing the txHash, the gasFeeCap
// used in GasUsed, and the blobFeeCap in CumuluativeGasUsed to make the values accessible from our // used in GasUsed, and the blobFeeCap in CumulativeGasUsed to make the values accessible from our
// test framework. // test framework.
func (b *mockBackend) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error) { func (b *mockBackend) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error) {
b.mu.RLock() b.mu.RLock()
......
...@@ -520,7 +520,7 @@ contract L2StandardBridge_BridgeERC20To_Test is PreBridgeERC20To { ...@@ -520,7 +520,7 @@ contract L2StandardBridge_BridgeERC20To_Test is PreBridgeERC20To {
} }
contract L2StandardBridge_Bridge_Test is Bridge_Initializer { contract L2StandardBridge_Bridge_Test is Bridge_Initializer {
/// @dev Tests that `finalizeBridgeETH` reverts if the receipient is the other bridge. /// @dev Tests that `finalizeBridgeETH` reverts if the recipient is the other bridge.
function test_finalizeBridgeETH_sendToSelf_reverts() external { function test_finalizeBridgeETH_sendToSelf_reverts() external {
vm.mockCall( vm.mockCall(
address(l2StandardBridge.messenger()), address(l2StandardBridge.messenger()),
...@@ -533,7 +533,7 @@ contract L2StandardBridge_Bridge_Test is Bridge_Initializer { ...@@ -533,7 +533,7 @@ contract L2StandardBridge_Bridge_Test is Bridge_Initializer {
l2StandardBridge.finalizeBridgeETH{ value: 100 }(alice, address(l2StandardBridge), 100, hex""); l2StandardBridge.finalizeBridgeETH{ value: 100 }(alice, address(l2StandardBridge), 100, hex"");
} }
/// @dev Tests that `finalizeBridgeETH` reverts if the receipient is the messenger. /// @dev Tests that `finalizeBridgeETH` reverts if the recipient is the messenger.
function test_finalizeBridgeETH_sendToMessenger_reverts() external { function test_finalizeBridgeETH_sendToMessenger_reverts() external {
vm.mockCall( vm.mockCall(
address(l2StandardBridge.messenger()), address(l2StandardBridge.messenger()),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment