Skip to content
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

fix: update simple_node #2787

Merged
merged 8 commits into from Mar 22, 2024
Merged

Conversation

joske
Copy link
Contributor

@joske joske commented Oct 20, 2023

Make simple_node work again.

Credit: @ljedrz

@joske joske requested a review from howardwu October 23, 2023 20:43
@joske joske force-pushed the fix/simple_node branch 2 times, most recently from 8172aa0 to 41579f2 Compare October 26, 2023 05:47
@joske joske force-pushed the fix/simple_node branch 2 times, most recently from 8bc18ef to 471b7a5 Compare November 2, 2023 10:23
Comment on lines 135 to 145
// Initialize the translucent ledger service.
let gen_key = account.private_key();
let public_balance_per_validator =
(1_500_000_000_000_000 - (num_nodes as u64) * 1_000_000_000_000) / (num_nodes as u64);
let mut balances = IndexMap::<Address<CurrentNetwork>, u64>::new();
for address in committee.members().keys() {
balances.insert(*address, public_balance_per_validator);
}
let mut rng = TestRng::default();
let gen_ledger = genesis_ledger(*gen_key, committee.clone(), balances.clone(), &mut rng);
let ledger = Arc::new(TranslucentLedgerService::new(gen_ledger));
Copy link
Member

Choose a reason for hiding this comment

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

Can this be abstracted and cleaned up?

Comment on lines 181 to 190
let gen_key = account.private_key();
let public_balance_per_validator =
(1_500_000_000_000_000 - (num_nodes as u64) * 1_000_000_000_000) / (num_nodes as u64);
let mut balances = IndexMap::<Address<CurrentNetwork>, u64>::new();
for address in committee.members().keys() {
balances.insert(*address, public_balance_per_validator);
}
let mut rng = TestRng::default();
let gen_ledger = genesis_ledger(*gen_key, committee.clone(), balances.clone(), &mut rng);
let ledger = Arc::new(TranslucentLedgerService::new(gen_ledger));
Copy link
Member

Choose a reason for hiding this comment

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

Can this be abstracted and cleaned up?

@joske joske changed the base branch from testnet3 to mainnet-staging March 13, 2024 08:38
@howardwu howardwu merged commit 08bcccc into AleoHQ:mainnet-staging Mar 22, 2024
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.

None yet

2 participants