From 789a2676ede66afa5011fa6a9b248dd751e29a02 Mon Sep 17 00:00:00 2001 From: maskpp Date: Mon, 22 Jan 2024 16:50:50 +0800 Subject: [PATCH 1/3] revert change --- .golangci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.golangci.yml b/.golangci.yml index df2b8fa37..a3a1da31f 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -39,6 +39,7 @@ linters: - gofmt - ineffassign - importas + - lll - makezero - misspell - misspell From 3f8c3a43ae1da065e204871b5bbc6939a93bc546 Mon Sep 17 00:00:00 2001 From: maskpp Date: Mon, 22 Jan 2024 20:00:33 +0800 Subject: [PATCH 2/3] trigger ci From 98081609078a3710acf7882bb4f7edc7afca7407 Mon Sep 17 00:00:00 2001 From: maskpp Date: Mon, 22 Jan 2024 20:55:27 +0800 Subject: [PATCH 3/3] fix weak test code --- prover/prover_test.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/prover/prover_test.go b/prover/prover_test.go index d9e2f5031..5891902d0 100644 --- a/prover/prover_test.go +++ b/prover/prover_test.go @@ -260,6 +260,15 @@ func (s *ProverTestSuite) TestContestWrongBlocks() { close(sink) }() + // Contest the transition. + contestedSink := make(chan *bindings.TaikoL1ClientTransitionContested, 3) + contestedSub, err := s.p.rpc.TaikoL1.WatchTransitionContested(nil, contestedSink, nil) + s.Nil(err) + defer func() { + contestedSub.Unsubscribe() + close(contestedSink) + }() + s.Nil(s.p.proveOp()) proofWithHeader := <-s.p.proofGenerationCh proofWithHeader.Opts.BlockHash = testutils.RandomHash() @@ -271,15 +280,6 @@ func (s *ProverTestSuite) TestContestWrongBlocks() { s.NotEqual(header.Hash(), common.BytesToHash(event.Tran.BlockHash[:])) s.Equal(header.ParentHash, common.BytesToHash(event.Tran.ParentHash[:])) - // Contest the transition. - contestedSink := make(chan *bindings.TaikoL1ClientTransitionContested) - contestedSub, err := s.p.rpc.TaikoL1.WatchTransitionContested(nil, contestedSink, nil) - s.Nil(err) - defer func() { - contestedSub.Unsubscribe() - close(contestedSink) - }() - s.Greater(header.Number.Uint64(), uint64(0)) s.Nil(s.p.onTransitionProved(context.Background(), event))