Skip to content

Commit

Permalink
fix: Return correct error in Corpus.Initialize (#537)
Browse files Browse the repository at this point in the history
Co-authored-by: anishnaik <[email protected]>
  • Loading branch information
MukulKolpe and anishnaik authored Jan 14, 2025
1 parent bf9430c commit 68a14ff
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions fuzzing/corpus/corpus.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ package corpus
import (
"bytes"
"fmt"
"math/big"
"os"
"path/filepath"
"regexp"
"strconv"
"sync"
"time"

"github.com/crytic/medusa/chain"
"github.com/crytic/medusa/fuzzing/calls"
"github.com/crytic/medusa/fuzzing/coverage"
Expand All @@ -12,13 +20,6 @@ import (
"github.com/crytic/medusa/utils/randomutils"
"github.com/ethereum/go-ethereum/common"
"github.com/google/uuid"
"math/big"
"os"
"path/filepath"
"regexp"
"strconv"
"sync"
"time"

"github.com/crytic/medusa/fuzzing/contracts"
)
Expand Down Expand Up @@ -363,7 +364,7 @@ func (c *Corpus) Initialize(baseTestChain *chain.TestChain, contractDefinitions
covMaps := coverage.GetCoverageTracerResults(messageResults)
_, _, covErr := c.coverageMaps.Update(covMaps)
if covErr != nil {
return 0, 0, err
return 0, 0, covErr
}
}
}
Expand Down

0 comments on commit 68a14ff

Please sign in to comment.