Skip to content

Commit

Permalink
Move Cardano.Wallet.Network.Light to network-layer
Browse files Browse the repository at this point in the history
  • Loading branch information
HeinrichApfelmus committed Feb 21, 2024
1 parent fd8cd04 commit 6dfcbb8
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 15 deletions.
53 changes: 46 additions & 7 deletions lib/network-layer/cardano-wallet-network-layer.cabal
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cabal-version: 3.4
cabal-version: 3.6
name: cardano-wallet-network-layer
version: 0.1.0.0
synopsis: Node communication layer functionality.
Expand All @@ -14,19 +14,39 @@ maintainer: hal@cardanofoundation.org
category: Network
build-type: Simple
extra-doc-files: CHANGELOG.md

-- extra-source-files:

common warnings
ghc-options: -Wall
common language
default-language:
Haskell2010
default-extensions:
NoImplicitPrelude
OverloadedStrings

common opts-lib
ghc-options: -Wall -Wcompat -Wredundant-constraints

if flag(release)
ghc-options: -O2 -Werror

common opts-exe
import: opts-lib
ghc-options: -threaded -rtsopts

flag release
description: Enable optimization and `-Werror`
default: False
manual: True

library
import: warnings
import: language, opts-lib
hs-source-dirs: src
exposed-modules:
Cardano.Wallet.Network
Cardano.Wallet.Network.Implementation
Cardano.Wallet.Network.Implementation.Ouroboros
Cardano.Wallet.Network.Implementation.UnliftIO
Cardano.Wallet.Network.Light
Cardano.Wallet.Network.Logging
Cardano.Wallet.Network.Logging.Aggregation

Expand Down Expand Up @@ -73,5 +93,24 @@ library
, unliftio
, unliftio-core

hs-source-dirs: src
default-language: Haskell2010
test-suite unit
import: language, opts-exe
type: exitcode-stdio-1.0
hs-source-dirs: test
build-depends:
base
, bytestring
, cardano-wallet-network-layer
, cardano-wallet-primitive
, contra-tracer
, io-classes
, text
, transformers
, hspec
, QuickCheck
build-tool-depends:
hspec-discover:hspec-discover
main-is:
Main.hs
other-modules:
Cardano.Wallet.Network.LightSpec
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ module Cardano.Wallet.Network.Implementation.UnliftIO
)
where

import Prelude

import qualified Control.Monad.Catch as Exceptions
import qualified UnliftIO

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import Cardano.BM.Data.Tracer
import Cardano.Wallet.Network
( ChainFollower (..)
)
import Cardano.Wallet.Primitive.Types
import Cardano.Wallet.Primitive.Types.Block
( BlockHeader (..)
, ChainPoint (..)
, chainPointFromBlockHeader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import Cardano.Wallet.Network.Light
, hoistLightSyncSource
, lightSync
)
import Cardano.Wallet.Primitive.Types
import Cardano.Wallet.Primitive.Types.Block
( BlockHeader (..)
, ChainPoint (..)
, chainPointFromBlockHeader
Expand Down
5 changes: 1 addition & 4 deletions lib/network-layer/test/Main.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
module Main (main) where

main :: IO ()
main = putStrLn "Test suite not yet implemented."
{-# OPTIONS_GHC -F -pgmF hspec-discover #-}
1 change: 0 additions & 1 deletion lib/unit/cardano-wallet-unit.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ test-suite unit
Cardano.Wallet.DB.Store.WalletState.StoreSpec
Cardano.Wallet.Delegation.ModelSpec
Cardano.Wallet.DelegationSpec
Cardano.Wallet.Network.LightSpec
Cardano.Wallet.Network.PortsSpec
Cardano.Wallet.NetworkSpec
Cardano.Wallet.Primitive.Delegation.StateSpec
Expand Down
1 change: 0 additions & 1 deletion lib/wallet/cardano-wallet.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ library
Cardano.Wallet.Flavor
Cardano.Wallet.Gen
Cardano.Wallet.Network.Config
Cardano.Wallet.Network.Light
Cardano.Wallet.Pools
Cardano.Wallet.Primitive.Delegation.State
Cardano.Wallet.Primitive.Delegation.UTxO
Expand Down

0 comments on commit 6dfcbb8

Please sign in to comment.