Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

Commit

Permalink
set more check
Browse files Browse the repository at this point in the history
  • Loading branch information
mask-pp committed Apr 23, 2024
1 parent d357a05 commit e314feb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
8 changes: 1 addition & 7 deletions bindings/encoding/custom_error.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,12 @@ func TryParsingCustomError(originalError error) error {

for _, customErrors := range customErrorMaps {
for _, customError := range customErrors {
if strings.HasPrefix(customError.ID.Hex(), errData) {
if strings.HasPrefix(customError.ID.Hex(), errData) || strings.Contains(errData, customError.Name) {
return errors.New(customError.Name)
}
}
}

for _, hookCustomError := range AssignmentHookABI.Errors {
if strings.HasPrefix(hookCustomError.ID.Hex(), errData) {
return errors.New(hookCustomError.Name)
}
}

return originalError
}

Expand Down
2 changes: 1 addition & 1 deletion prover/proof_submitter/proof_contester_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

func (s *ProofSubmitterTestSuite) TestSubmitContestNoTransition() {
s.NotNil(
s.Error(
s.contester.SubmitContest(
context.Background(),
common.Big256,
Expand Down
2 changes: 1 addition & 1 deletion prover/proof_submitter/transaction/sender_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (s *TransactionTestSuite) TestSendTxWithBackoff() {
l1HeadChild, err := s.RPCClient.L1.HeaderByNumber(context.Background(), new(big.Int).Sub(l1Head.Number, common.Big1))
s.Nil(err)
meta := &bindings.TaikoDataBlockMetadata{L1Height: l1HeadChild.Number.Uint64(), L1Hash: l1HeadChild.Hash()}
s.NotNil(s.sender.Send(
s.Error(s.sender.Send(
context.Background(),
&producer.ProofWithHeader{
Meta: meta,
Expand Down

0 comments on commit e314feb

Please sign in to comment.