-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create-testnet-data: take optional node configuration file as input or generate it #908
base: main
Are you sure you want to change the base?
Conversation
c1d5553
to
1b5e0f1
Compare
4b6d12c
to
b75da64
Compare
@@ -0,0 +1,206 @@ | |||
{-# LANGUAGE DataKinds #-} | |||
{-# LANGUAGE GADTs #-} | |||
{-# LANGUAGE LambdaCase #-} |
Check warning
Code scanning / HLint
Unused LANGUAGE pragma Warning
Found:
{-# LANGUAGE LambdaCase #-}
Perhaps you should remove it.
{-# LANGUAGE DataKinds #-} | ||
{-# LANGUAGE GADTs #-} | ||
{-# LANGUAGE LambdaCase #-} | ||
{-# LANGUAGE NamedFieldPuns #-} |
Check warning
Code scanning / HLint
Unused LANGUAGE pragma Warning
Found:
{-# LANGUAGE NamedFieldPuns #-}
Perhaps you should remove it.
{-# LANGUAGE GADTs #-} | ||
{-# LANGUAGE LambdaCase #-} | ||
{-# LANGUAGE NamedFieldPuns #-} | ||
{-# LANGUAGE NumericUnderscores #-} |
Check warning
Code scanning / HLint
Unused LANGUAGE pragma Warning
Found:
{-# LANGUAGE NumericUnderscores #-}
Perhaps you should remove it.
{-# LANGUAGE OverloadedStrings #-} | ||
{-# LANGUAGE RankNTypes #-} | ||
{-# LANGUAGE ScopedTypeVariables #-} | ||
{-# LANGUAGE TypeApplications #-} |
Check warning
Code scanning / HLint
Unused LANGUAGE pragma Warning
Found:
{-# LANGUAGE TypeApplications #-}
Perhaps you should remove it.
-- protocol version for a given era that has had an intraera hardfork. | ||
protocolVersions :: ShelleyBasedEra era -> Aeson.KeyMap Aeson.Value | ||
protocolVersions sbe' = | ||
Aeson.fromList $ |
Check notice
Code scanning / HLint
Redundant $ Note
Found:
Aeson.fromList
$ ([case sbe' of
ShelleyBasedEraShelley
-> ("LastKnownBlockVersion-Major", Aeson.Number 2)
ShelleyBasedEraAllegra
-> ("LastKnownBlockVersion-Major", Aeson.Number 3)
ShelleyBasedEraMary
-> ("LastKnownBlockVersion-Major", Aeson.Number 4)
ShelleyBasedEraAlonzo
-> ("LastKnownBlockVersion-Major", Aeson.Number 5)
ShelleyBasedEraBabbage
-> ("LastKnownBlockVersion-Major", Aeson.Number 8)
ShelleyBasedEraConway
-> ("LastKnownBlockVersion-Major", Aeson.Number 9),
("LastKnownBlockVersion-Minor", Aeson.Number 0),
("LastKnownBlockVersion-Alt", Aeson.Number 0)])
Perhaps:
Aeson.fromList
([case sbe' of
ShelleyBasedEraShelley
-> ("LastKnownBlockVersion-Major", Aeson.Number 2)
ShelleyBasedEraAllegra
-> ("LastKnownBlockVersion-Major", Aeson.Number 3)
ShelleyBasedEraMary
-> ("LastKnownBlockVersion-Major", Aeson.Number 4)
ShelleyBasedEraAlonzo
-> ("LastKnownBlockVersion-Major", Aeson.Number 5)
ShelleyBasedEraBabbage
-> ("LastKnownBlockVersion-Major", Aeson.Number 8)
ShelleyBasedEraConway
-> ("LastKnownBlockVersion-Major", Aeson.Number 9),
("LastKnownBlockVersion-Minor", Aeson.Number 0),
("LastKnownBlockVersion-Alt", Aeson.Number 0)])
( [ case sbe' of | ||
ShelleyBasedEraShelley -> ("LastKnownBlockVersion-Major", Aeson.Number 2) | ||
ShelleyBasedEraAllegra -> ("LastKnownBlockVersion-Major", Aeson.Number 3) | ||
ShelleyBasedEraMary -> ("LastKnownBlockVersion-Major", Aeson.Number 4) | ||
ShelleyBasedEraAlonzo -> ("LastKnownBlockVersion-Major", Aeson.Number 5) | ||
ShelleyBasedEraBabbage -> ("LastKnownBlockVersion-Major", Aeson.Number 8) | ||
ShelleyBasedEraConway -> ("LastKnownBlockVersion-Major", Aeson.Number 9) | ||
, ("LastKnownBlockVersion-Minor", Aeson.Number 0) | ||
, ("LastKnownBlockVersion-Alt", Aeson.Number 0) | ||
] | ||
) |
Check warning
Code scanning / HLint
Redundant bracket Warning
Found:
([case sbe' of
ShelleyBasedEraShelley
-> ("LastKnownBlockVersion-Major", Aeson.Number 2)
ShelleyBasedEraAllegra
-> ("LastKnownBlockVersion-Major", Aeson.Number 3)
ShelleyBasedEraMary
-> ("LastKnownBlockVersion-Major", Aeson.Number 4)
ShelleyBasedEraAlonzo
-> ("LastKnownBlockVersion-Major", Aeson.Number 5)
ShelleyBasedEraBabbage
-> ("LastKnownBlockVersion-Major", Aeson.Number 8)
ShelleyBasedEraConway
-> ("LastKnownBlockVersion-Major", Aeson.Number 9),
("LastKnownBlockVersion-Minor", Aeson.Number 0),
("LastKnownBlockVersion-Alt", Aeson.Number 0)])
Perhaps:
[case sbe' of
ShelleyBasedEraShelley
-> ("LastKnownBlockVersion-Major", Aeson.Number 2)
ShelleyBasedEraAllegra
-> ("LastKnownBlockVersion-Major", Aeson.Number 3)
ShelleyBasedEraMary
-> ("LastKnownBlockVersion-Major", Aeson.Number 4)
ShelleyBasedEraAlonzo
-> ("LastKnownBlockVersion-Major", Aeson.Number 5)
ShelleyBasedEraBabbage
-> ("LastKnownBlockVersion-Major", Aeson.Number 8)
ShelleyBasedEraConway
-> ("LastKnownBlockVersion-Major", Aeson.Number 9),
("LastKnownBlockVersion-Minor", Aeson.Number 0),
("LastKnownBlockVersion-Alt", Aeson.Number 0)]
6723d62
to
5181d0a
Compare
writeGenesisPathsToNodeConfigFile | ||
tmpOutputNodeConfigPath2 | ||
( Map.fromList | ||
[ ("ConwayGenesisFile", Text.pack $ conwayGenesisFilename) |
Check notice
Code scanning / HLint
Redundant $ Note
Found:
Text.pack $ conwayGenesisFilename
Perhaps:
Text.pack conwayGenesisFilename
tmpOutputNodeConfigPath2 | ||
( Map.fromList | ||
[ ("ConwayGenesisFile", Text.pack $ conwayGenesisFilename) | ||
, ("ShelleyGenesisFile", Text.pack $ shelleyGenesisFilename) |
Check notice
Code scanning / HLint
Redundant $ Note
Found:
Text.pack $ shelleyGenesisFilename
Perhaps:
Text.pack shelleyGenesisFilename
( Map.fromList | ||
[ ("ConwayGenesisFile", Text.pack $ conwayGenesisFilename) | ||
, ("ShelleyGenesisFile", Text.pack $ shelleyGenesisFilename) | ||
, ("AlonzoGenesisFile", Text.pack $ alonzoGenesisFilename) |
Check notice
Code scanning / HLint
Redundant $ Note
Found:
Text.pack $ alonzoGenesisFilename
Perhaps:
Text.pack alonzoGenesisFilename
rotationObject = | ||
Aeson.Object $ | ||
Aeson.fromList | ||
[ ("rpLogLimitBytes", Aeson.Number 5000000) |
Check notice
Code scanning / HLint
Use underscore Note
Found:
5000000
Perhaps:
5_000_000
…guration file# Changelog
Context
How to trust this PR
TBD
Checklist