-
Notifications
You must be signed in to change notification settings - Fork 75
[CHORE] BlockchainConfig as a case class #674
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
Conversation
@@ -43,6 +43,8 @@ object ScenarioSetup { | |||
|
|||
abstract class ScenarioSetup(_vm: VMImpl, scenario: BlockchainScenario) { | |||
|
|||
import BlockchainTestConfig._ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is, as baseBlockchainConfig and withSkippedPoWValidationBlockchainConfig functions use the BlockchainConfig's defined there
@@ -172,43 +172,43 @@ class EtcHandshakerSpec extends FlatSpec with Matchers { | |||
override val appStateStorage: AppStateStorage = TestSetup.this.storagesInstance.storages.appStateStorage | |||
} | |||
|
|||
override lazy val blockchainConfig = new BlockchainConfig { | |||
override lazy val blockchainConfig = BlockchainConfig ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(minor) I guess here you could use the blockchainConfig.copy
given EphemBlockchainTestSetup
has access to default instance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
…e/blockchainconfig-as-caseclass
Description
Changes BlockchainConfig from being a trait to a case class.
As seen on a couple of examples here, this will: