Skip to content

Commit ce1df7e

Browse files
revert some changes that were not necessary
1 parent 57b31b4 commit ce1df7e

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

lib/Echidna/ABI.hs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ getRandomInt :: MonadRandom m => Int -> m Integer
191191
getRandomInt n =
192192
getRandomR =<< Random.weighted
193193
[ ((-1023, 1023), 1)
194-
, ((-(2 ^ (n - 1)), 2 ^ (n - 1) - 1), 9)
194+
, (((-1) * 2 ^ (n - 1), 2 ^ (n - 1) - 1), 9)
195195
]
196196

197197
-- | Synthesize a random 'AbiValue' given its 'AbiType'. Doesn't use a dictionary.
@@ -352,11 +352,6 @@ mutateAbiCall = traverse f
352352
mv <- mutateAbiValue $ xs !! k
353353
return $ replaceAt mv xs k
354354

355-
mutateAllAbiCall :: MonadRandom m => SolCall -> m SolCall
356-
mutateAllAbiCall = traverse f
357-
where f [] = pure []
358-
f xs = mapM mutateAbiValue xs
359-
360355
-- Generation, with dictionary
361356

362357
-- | Given a generator taking an @a@ and returning a @b@ and a way to get @b@s associated with some

lib/Echidna/Transaction.hs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,6 @@ mutateTx tx@Tx{call = SolCall c} = do
155155
skip _ = pure tx
156156
mutateTx tx = pure tx
157157

158-
regenTx :: MonadRandom m => Tx -> m Tx
159-
regenTx tx@Tx{call = SolCall c} = do
160-
mutateAllAbiCall c >>= \c' -> pure tx { call = SolCall c' }
161-
regenTx tx = pure tx
162-
163158
-- | Given a 'Transaction', set up some 'VM' so it can be executed. Effectively, this just brings
164159
-- 'Transaction's \"on-chain\".
165160
setupTx :: (MonadIO m, MonadState (VM Concrete RealWorld) m) => Tx -> m ()

0 commit comments

Comments
 (0)