Skip to content

Commit

Permalink
make sure pools are sorted by apparent performance in scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
KtorZ committed Jan 21, 2020
1 parent 8ec5ef6 commit 9f45466
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -27,16 +27,20 @@ import Cardano.Wallet.Primitive.AddressDerivation
)
import Cardano.Wallet.Primitive.Types
( Direction (..), PoolId (..), TxStatus (..), WalletDelegation (..) )
import Control.Arrow
( second )
import Control.Monad
( forM_ )
import Data.Functor.Identity
( Identity (..) )
import Data.Generics.Internal.VL.Lens
( view, (^.) )
import Data.List
( find )
( find, sortOn )
import Data.Maybe
( isJust, isNothing )
import Data.Ord
( Down (..) )
import Data.Proxy
( Proxy (..) )
import Data.Quantity
Expand Down Expand Up @@ -123,7 +127,7 @@ spec = do
-- For some reason, the first pool (the node we run), produces
-- blocks in 100% of the /slots/. This means it will have produced
-- either 1 or 2 blocks in the current epoch.
verify r
verify (second (fmap (sortOn (Down . view #apparentPerformance))) r)
[ expectListSizeEqual 3

, expectListItemFieldSatisfy 0
Expand Down

0 comments on commit 9f45466

Please sign in to comment.