Skip to content
This repository was archived by the owner on Mar 1, 2019. It is now read-only.

Commit 7ff9153

Browse files
authored
Merge pull request input-output-hk/cardano-sl#3637 from input-output-hk/nc/property-testing-rebased
CDEC-380: Executable spec for existing node behaviour
2 parents 744b171 + d9ab78f commit 7ff9153

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+133
-3493
lines changed

cardano-sl-wallet-new.cabal

+3-10
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ library
125125
Cardano.Wallet.Kernel.Submission.Worker
126126
Cardano.Wallet.Kernel.Transactions
127127
Cardano.Wallet.Kernel.Types
128-
Cardano.Wallet.Kernel.Util
129128
Cardano.Wallet.Kernel.Util.Core
130129
Cardano.Wallet.Kernel.Util.StrictList
131130
Cardano.Wallet.Kernel.Util.StrictNonEmpty
@@ -248,6 +247,7 @@ library
248247
, unliftio
249248
, unliftio-core
250249
, unordered-containers
250+
, utxo
251251
, vector
252252
, wai
253253
, wai-middleware-throttle
@@ -457,15 +457,7 @@ test-suite wallet-unit-tests
457457
Util.MultiSet
458458
Util.QuickCheck
459459
Util.Range
460-
Util.Validated
461-
UTxO.Bootstrap
462-
UTxO.Context
463-
UTxO.Crypto
464-
UTxO.DSL
465-
UTxO.Generator
466-
UTxO.Interpreter
467-
UTxO.Translate
468-
UTxO.Verify
460+
UTxO.ToCardano.Interpreter
469461
Wallet.Abstract
470462
Wallet.Basic
471463
Wallet.Incremental
@@ -543,6 +535,7 @@ test-suite wallet-unit-tests
543535
, formatting
544536
, universum
545537
, unordered-containers
538+
, utxo
546539
, vector
547540
-- needed only for input selection evaluation
548541
, bytestring

src/Cardano/Wallet/Kernel/CoinSelection/Generic.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ import Formatting (bprint, build, (%))
7575
import qualified Formatting.Buildable
7676
import Test.QuickCheck (Arbitrary (..))
7777

78-
import Cardano.Wallet.Kernel.Util (withoutKeys)
7978
import Cardano.Wallet.Kernel.Util.StrictStateT
79+
import UTxO.Util (withoutKeys)
8080

8181
{-------------------------------------------------------------------------------
8282
Abstract domain

src/Cardano/Wallet/Kernel/DB/AcidState.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ import qualified Cardano.Wallet.Kernel.DB.Util.Zoomable as Z
7979
import Cardano.Wallet.Kernel.NodeStateAdaptor (SecurityParameter (..))
8080
import Cardano.Wallet.Kernel.PrefilterTx (AddrWithId,
8181
PrefilteredBlock (..), emptyPrefilteredBlock)
82-
import Cardano.Wallet.Kernel.Util (markMissingMapEntries)
82+
import UTxO.Util (markMissingMapEntries)
8383

8484
{-------------------------------------------------------------------------------
8585
Top-level database

src/Cardano/Wallet/Kernel/DB/Compression.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import Cardano.Wallet.Kernel.DB.BlockContext
1919
import Cardano.Wallet.Kernel.DB.BlockMeta
2020
import Cardano.Wallet.Kernel.DB.InDb
2121
import Cardano.Wallet.Kernel.DB.Spec.Pending (PendingDiff)
22-
import Cardano.Wallet.Kernel.Util
22+
import UTxO.Util
2323

2424
import Test.Pos.Core.Arbitrary ()
2525

src/Cardano/Wallet/Kernel/DB/HdWallet.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,10 @@ import Cardano.Wallet.Kernel.DB.Util.IxSet
115115
import qualified Cardano.Wallet.Kernel.DB.Util.IxSet as IxSet hiding (Indexable)
116116
import qualified Cardano.Wallet.Kernel.DB.Util.Zoomable as Z
117117
import Cardano.Wallet.Kernel.NodeStateAdaptor (SecurityParameter (..))
118-
import Cardano.Wallet.Kernel.Util (liftNewestFirst, modifyAndGetOld)
119118
import qualified Cardano.Wallet.Kernel.Util.StrictList as SL
120119
import Cardano.Wallet.Kernel.Util.StrictNonEmpty (StrictNonEmpty (..))
121120
import qualified Cardano.Wallet.Kernel.Util.StrictNonEmpty as SNE
121+
import UTxO.Util (liftNewestFirst, modifyAndGetOld)
122122

123123
{-------------------------------------------------------------------------------
124124
Supporting types

src/Cardano/Wallet/Kernel/DB/HdWallet/Update.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Universum
99

1010
import Cardano.Wallet.Kernel.DB.HdWallet
1111
import Cardano.Wallet.Kernel.DB.Util.AcidState
12-
import Cardano.Wallet.Kernel.Util (modifyAndGetNew)
12+
import UTxO.Util (modifyAndGetNew)
1313

1414
{-------------------------------------------------------------------------------
1515
UPDATE

src/Cardano/Wallet/Kernel/DB/InDb.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import qualified Pos.Core.Attributes as Core
3535
import qualified Pos.Crypto as Core
3636

3737
import qualified Cardano.Crypto.Wallet as CCW
38-
import Cardano.Wallet.Kernel.Util
38+
import UTxO.Util
3939

4040
{-# ANN module ("HLint: ignore Reduce duplication" :: Text) #-}
4141

src/Cardano/Wallet/Kernel/DB/Spec.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ import Cardano.Wallet.Kernel.DB.Compression
6666
import Cardano.Wallet.Kernel.DB.InDb
6767
import Cardano.Wallet.Kernel.DB.Spec.Pending (Pending)
6868
import qualified Cardano.Wallet.Kernel.DB.Spec.Pending as Pending
69-
import Cardano.Wallet.Kernel.Util
7069
import Cardano.Wallet.Kernel.Util.Core as Core
7170
import qualified Cardano.Wallet.Kernel.Util.StrictList as SL
7271
import Cardano.Wallet.Kernel.Util.StrictNonEmpty (StrictNonEmpty (..))
7372
import qualified Cardano.Wallet.Kernel.Util.StrictNonEmpty as SNE
73+
import UTxO.Util
7474

7575
{-# ANN module ("HLint: ignore Reduce duplication" :: Text) #-}
7676

src/Cardano/Wallet/Kernel/DB/Spec/Pending.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ import qualified Pos.Core as Core
4949
import Pos.Crypto.Hashing (hash)
5050

5151
import Cardano.Wallet.Kernel.DB.InDb
52-
import qualified Cardano.Wallet.Kernel.Util as Util
5352
import qualified Cardano.Wallet.Kernel.Util.Core as Core
53+
import qualified UTxO.Util as Util
5454

5555
{-------------------------------------------------------------------------------
5656
Pending transactions

src/Cardano/Wallet/Kernel/DB/Spec/Update.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ import Cardano.Wallet.Kernel.DB.Spec.Read
4444
import Cardano.Wallet.Kernel.DB.Util.AcidState
4545
import Cardano.Wallet.Kernel.NodeStateAdaptor (SecurityParameter (..))
4646
import Cardano.Wallet.Kernel.PrefilterTx (PrefilteredBlock (..))
47-
import Cardano.Wallet.Kernel.Util (liftNewestFirst)
4847
import qualified Cardano.Wallet.Kernel.Util.Core as Core
4948
import qualified Cardano.Wallet.Kernel.Util.StrictList as SL
5049
import Cardano.Wallet.Kernel.Util.StrictNonEmpty (StrictNonEmpty (..))
5150
import qualified Cardano.Wallet.Kernel.Util.StrictNonEmpty as SNE
51+
import UTxO.Util (liftNewestFirst)
5252

5353
{-------------------------------------------------------------------------------
5454
Errors

src/Cardano/Wallet/Kernel/DB/Updates.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ import Pos.Core.Chrono
1818

1919
import Cardano.Wallet.Kernel.DB.InDb
2020
import Cardano.Wallet.Kernel.DB.Util.AcidState
21-
import Cardano.Wallet.Kernel.Util (modifyAndGetNew)
2221
import Cardano.Wallet.Kernel.Util.StrictList (StrictList)
2322
import qualified Cardano.Wallet.Kernel.Util.StrictList as SL
23+
import UTxO.Util (modifyAndGetNew)
2424

2525
-- | Available updates
2626
--

src/Cardano/Wallet/Kernel/DB/Util/AcidState.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ import Cardano.Wallet.Kernel.DB.Util.IxSet (HasPrimKey, Indexable,
4141
IxSet, PrimKey)
4242
import qualified Cardano.Wallet.Kernel.DB.Util.IxSet as IxSet
4343
import qualified Cardano.Wallet.Kernel.DB.Util.Zoomable as Z
44-
import Cardano.Wallet.Kernel.Util (mustBeRight)
4544
import Cardano.Wallet.Kernel.Util.StrictStateT
45+
import UTxO.Util (mustBeRight)
4646

4747
{-------------------------------------------------------------------------------
4848
Acid-state updates

src/Cardano/Wallet/Kernel/Transactions.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ import Cardano.Wallet.Kernel.Pending (PartialTxMeta, newForeign,
6767
import Cardano.Wallet.Kernel.Read (getWalletSnapshot)
6868
import Cardano.Wallet.Kernel.Types (AccountId (..),
6969
RawResolvedTx (..), WalletId (..))
70-
import Cardano.Wallet.Kernel.Util (shuffleNE)
7170
import Cardano.Wallet.Kernel.Util.Core
7271
import Cardano.Wallet.WalletLayer.Kernel.Conv (exceptT)
72+
import UTxO.Util (shuffleNE)
7373

7474
{-------------------------------------------------------------------------------
7575
Generating payments and estimating fees

0 commit comments

Comments
 (0)