Skip to content

Commit

Permalink
feat: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha committed Jan 15, 2025
1 parent 60749ae commit aabdd14
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/taiko-client/driver/chain_syncer/blob/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ func (s *Syncer) onBlockProposedOntake(
} else {
txListFetcher = txlistFetcher.NewCalldataFetch(s.rpc)
}
txListBytes, err := txListFetcher.Fetch(ctx, tx, meta)
txListBytes, err := txListFetcher.FetchOntake(ctx, tx, meta)
if err != nil {
return fmt.Errorf("failed to fetch tx list: %w", err)
}
Expand Down
2 changes: 1 addition & 1 deletion packages/taiko-client/driver/txlist_fetcher/blob.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func NewBlobTxListFetcher(l1Beacon *rpc.BeaconClient, ds *rpc.BlobDataSource) *B
}

// Fetch implements the TxListFetcher interface.
func (d *BlobFetcher) Fetch(
func (d *BlobFetcher) FetchOntake(
ctx context.Context,
_ *types.Transaction,
meta metadata.TaikoBlockMetaDataOntake,
Expand Down
2 changes: 1 addition & 1 deletion packages/taiko-client/driver/txlist_fetcher/calldata.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func NewCalldataFetch(rpc *rpc.Client) *CalldataFetcher {
}

// Fetch fetches the txList bytes from the transaction's calldata.
func (d *CalldataFetcher) Fetch(
func (d *CalldataFetcher) FetchOntake(
ctx context.Context,
tx *types.Transaction,
meta metadata.TaikoBlockMetaDataOntake,
Expand Down
2 changes: 1 addition & 1 deletion packages/taiko-client/driver/txlist_fetcher/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ import (

// TxListFetcher is responsible for fetching the L2 txList bytes from L1
type TxListFetcher interface {
Fetch(ctx context.Context, tx *types.Transaction, meta metadata.TaikoBlockMetaDataOntake) ([]byte, error)
FetchOntake(ctx context.Context, tx *types.Transaction, meta metadata.TaikoBlockMetaDataOntake) ([]byte, error)
}
18 changes: 9 additions & 9 deletions packages/taiko-client/pkg/rpc/subscription_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,31 @@ func TestSubscribeEvent(t *testing.T) {
}))
}

func TestSubscribeBlockVerified(t *testing.T) {
require.NotNil(t, SubscribeBlockVerified(
func TestSubscribeBlockVerifiedV2(t *testing.T) {
require.NotNil(t, SubscribeBlockVerifiedV2(
newTestClient(t).OntakeClients.TaikoL1,
make(chan *ontakeBindings.TaikoL1ClientBlockVerified, 1024)),
make(chan *ontakeBindings.TaikoL1ClientBlockVerifiedV2, 1024)),
)
}

func TestSubscribeBlockProposed(t *testing.T) {
require.NotNil(t, SubscribeBlockProposed(
require.NotNil(t, SubscribeBlockProposedV2(
newTestClient(t).OntakeClients.TaikoL1,
make(chan *ontakeBindings.TaikoL1ClientBlockProposed, 1024)),
make(chan *ontakeBindings.TaikoL1ClientBlockProposedV2, 1024)),
)
}

func TestSubscribeTransitionProved(t *testing.T) {
require.NotNil(t, SubscribeTransitionProved(
require.NotNil(t, SubscribeTransitionProvedV2(
newTestClient(t).OntakeClients.TaikoL1,
make(chan *ontakeBindings.TaikoL1ClientTransitionProved, 1024)),
make(chan *ontakeBindings.TaikoL1ClientTransitionProvedV2, 1024)),
)
}

func TestSubscribeTransitionContested(t *testing.T) {
require.NotNil(t, SubscribeTransitionContested(
require.NotNil(t, SubscribeTransitionContestedV2(
newTestClient(t).OntakeClients.TaikoL1,
make(chan *ontakeBindings.TaikoL1ClientTransitionContested, 1024)),
make(chan *ontakeBindings.TaikoL1ClientTransitionContestedV2, 1024)),
)
}

Expand Down

0 comments on commit aabdd14

Please sign in to comment.