Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multicore #963

Merged
merged 13 commits into from
May 5, 2023
9 changes: 5 additions & 4 deletions lib/Echidna.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module Echidna where

import Control.Monad.Catch (MonadThrow(..))
import Data.IORef (writeIORef)
import Data.List (find)
import Data.List.NonEmpty (NonEmpty)
import Data.List.NonEmpty qualified as NE
Expand All @@ -18,12 +19,11 @@ import Echidna.Output.Corpus
import Echidna.Processor
import Echidna.Solidity
import Echidna.Test (createTests)
import Echidna.Types.Campaign hiding (corpus)
import Echidna.Types.Campaign
import Echidna.Types.Config
import Echidna.Types.Random
import Echidna.Types.Signature
import Echidna.Types.Solidity
import Echidna.Types.Test
import Echidna.Types.Tx
import Echidna.Types.World

Expand All @@ -44,7 +44,7 @@ prepareContract
-> NonEmpty FilePath
-> Maybe ContractName
-> Seed
-> IO (VM, World, [EchidnaTest], GenDict)
-> IO (VM, World, GenDict)
prepareContract env contracts solFiles specifiedContract seed = do
let solConf = env.cfg.solConf

Expand Down Expand Up @@ -82,7 +82,8 @@ prepareContract env contracts solFiles specifiedContract seed = do
seed
(returnTypes contracts)

pure (vm, world, echidnaTests, dict)
writeIORef env.testsRef echidnaTests
pure (vm, world, dict)

loadInitialCorpus :: Env -> World -> IO [[Tx]]
loadInitialCorpus env world = do
Expand Down
Loading