-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
862: jormungandr launch: use --rest-listen instead of generating config.yaml r=KtorZ a=rvl Relates to #832 and #848. Supersedes #850. # Overview `cardano-wallet-jormungandr launch` specifies the REST API port and storage directory. The user provides the rest of the Jörmungandr configuration (e.g. trusted peers). # Comments The Jörmungandr P2P listen address, port, and log level are no longer configured by cardano-wallet. Co-authored-by: Rodney Lorrimar <[email protected]> Co-authored-by: KtorZ <[email protected]>
- Loading branch information
Showing
7 changed files
with
147 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,6 @@ module Cardano.Wallet.Jormungandr.Compatibility | |
-- * Node's Configuration | ||
, BaseUrl (..) | ||
, Scheme (..) | ||
, genConfigFile | ||
, localhostBaseUrl | ||
, baseUrlToText | ||
) where | ||
|
@@ -39,8 +38,6 @@ import Cardano.Wallet.Jormungandr.Environment | |
( KnownNetwork (..), Network (..) ) | ||
import Cardano.Wallet.Jormungandr.Primitive.Types | ||
( Tx (..) ) | ||
import Cardano.Wallet.Network.Ports | ||
( PortNumber ) | ||
import Cardano.Wallet.Primitive.AddressDerivation | ||
( KeyToAddress (..), getRawKey ) | ||
import Cardano.Wallet.Primitive.AddressDerivation.Random | ||
|
@@ -60,8 +57,6 @@ import Control.Arrow | |
( second ) | ||
import Control.Monad | ||
( when ) | ||
import Data.Aeson | ||
( Value (..), object, (.=) ) | ||
import Data.ByteString | ||
( ByteString ) | ||
import Data.ByteString.Base58 | ||
|
@@ -78,14 +73,11 @@ import Data.Word | |
( Word16 ) | ||
import Servant.Client.Core | ||
( BaseUrl (..), Scheme (..), showBaseUrl ) | ||
import System.FilePath | ||
( FilePath, (</>) ) | ||
|
||
import qualified Cardano.Byron.Codec.Cbor as CBOR | ||
import qualified Cardano.Wallet.Primitive.Types as W | ||
import qualified Codec.Binary.Bech32 as Bech32 | ||
import qualified Codec.CBOR.Write as CBOR | ||
import qualified Data.Aeson as Aeson | ||
import qualified Data.ByteString as BS | ||
import qualified Data.ByteString.Char8 as B8 | ||
import qualified Data.Text as T | ||
|
@@ -223,29 +215,6 @@ instance KnownNetwork n => DecodeAddress (Jormungandr n) where | |
<> B8.unpack (BS.pack [discriminant]) | ||
<> "." | ||
|
||
-- | Generate a configuration file for Jö[email protected] | ||
genConfigFile | ||
:: FilePath | ||
-> PortNumber | ||
-> BaseUrl | ||
-> Aeson.Value | ||
genConfigFile stateDir addressPort (BaseUrl _ host port _) = object | ||
[ "storage" .= (stateDir </> "chain") | ||
, "rest" .= object | ||
[ "listen" .= String listen ] | ||
, "p2p" .= object | ||
[ "trusted_peers" .= ([] :: [()]) | ||
, "topics_of_interest" .= object | ||
[ "messages" .= String "low" | ||
, "blocks" .= String "normal" | ||
] | ||
, "public_address" .= String publicAddress | ||
] | ||
] | ||
where | ||
listen = T.pack $ mconcat [host, ":", show port] | ||
publicAddress = T.pack $ mconcat ["/ip4/127.0.0.1/tcp/", show addressPort] | ||
|
||
{------------------------------------------------------------------------------- | ||
Base URL | ||
-------------------------------------------------------------------------------} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.