Skip to content

Genesis initial balances#1231

Merged
shamil-gadelshin merged 6 commits intoJoystream:iznikfrom
mnaamani:genesis-initial-balances
Sep 4, 2020
Merged

Genesis initial balances#1231
shamil-gadelshin merged 6 commits intoJoystream:iznikfrom
mnaamani:genesis-initial-balances

Conversation

@mnaamani
Copy link
Member

@mnaamani mnaamani commented Sep 4, 2020

Option to include initial balances for accounts at genesis from exported json file.

Corresponding export script: Joystream/runtime-state-export-tools@0b787aa

Copy link
Contributor

@shamil-gadelshin shamil-gadelshin left a comment

Choose a reason for hiding this comment

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

Just a couple of minor comments.

initial_account_balances,
)
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Please add a small comment on why we disable the lint here.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@@ -191,6 +212,7 @@ impl ChainSpecBuilder {
}
}

Copy link
Contributor

Choose a reason for hiding this comment

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

I noticed you disabled this lint at least twice. Do you mind to convert it to module-scope lint with a comment?

@@ -241,6 +264,12 @@ fn genesis_constructor(
)
};

Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think about functional style or you prefer the imperative style more?
let initial_account_balances = initial_balances_path.map(|path| {initial_balances::from_json(path.as_path())}).unwrap_or_else(vec![]);

Copy link
Member Author

Choose a reason for hiding this comment

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

Applied suggestion to other code in same function as well.

Copy link
Contributor

@shamil-gadelshin shamil-gadelshin left a comment

Choose a reason for hiding this comment

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

LGTM

@shamil-gadelshin shamil-gadelshin merged commit 334a65a into Joystream:iznik Sep 4, 2020
@mnaamani mnaamani deleted the genesis-initial-balances branch September 4, 2020 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments