Skip to content

Conversation

@zone117x
Copy link
Contributor

Closes #2176

@zone117x zone117x force-pushed the feat/2176-mocknet-chainstate branch from f23dc96 to 39f4fb6 Compare December 17, 2020 13:05
@zone117x zone117x changed the title feat: all small test genesis file to be used in mocknet mode Allow small test genesis file to be used in mocknet mode Dec 17, 2020
@zone117x zone117x self-assigned this Dec 17, 2020
pub fn new(config: Config, boot_block_exec: Box<dyn FnOnce(&mut ClarityTx) -> ()>) -> Self {
let use_test_genesis_data = if config.burnchain.mode == "mocknet" {
// When running in mocknet mode allow the small test genesis chainstate data to be enabled.
if env::var("BLOCKSTACK_USE_TEST_GENESIS_CHAINSTATE") == Ok("1".to_string()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of making this an envar, could we add this as a config option?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could, although env vars are easier to deal with in the tooling than config files. How strongly do you prefer config file vs env var?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice for the competition to set this as a config option

Copy link
Contributor Author

@zone117x zone117x Dec 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we okay with allowing both methods? Config and env var

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jcnelson @friedger Please see latest commit where support for both config toml and env var is added.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both are fine.

@zone117x zone117x force-pushed the feat/2176-mocknet-chainstate branch from b8f20b1 to e51b3b0 Compare December 18, 2020 15:20
Copy link
Contributor

@kantai kantai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Member

@jcnelson jcnelson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @zone117x

@zone117x zone117x merged commit bcc51a1 into next Dec 18, 2020
@blockstack-devops
Copy link
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@stacks-network stacks-network locked as resolved and limited conversation to collaborators Nov 27, 2024
@wileyj wileyj deleted the feat/2176-mocknet-chainstate branch March 11, 2025 21:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants