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

Configure initial delegation #429

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion charts/tezos/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ should_generate_unsafe_deterministic_data: false
# can be given a bootstrap balance and can also be configured to be bootstrap
# baker accounts. Accounts with balances set to "0" will be imported by the
# node but they will not be bootstrap accounts. If you don't set a bootstrap
# balance, it will default to the `bootstrap_mutez` field above.
# balance, it will default to the `bootstrap_mutez` field above. The `delegate_to`
# field names another account that this account will delegate to.
#
accounts: {}
# baker0:
Expand All @@ -60,6 +61,7 @@ accounts: {}
# type: public
# is_bootstrap_baker_account: false
# bootstrap_balance: "4000000000000"
# delegate_to: baker0

## NODES
##
Expand Down
7 changes: 6 additions & 1 deletion utils/config-generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,12 @@ def get_genesis_accounts_pubkey_and_balance(accounts):
key = v.get("pkh")
else:
key = v.get("pk")
pubkey_and_balance_pairs.append([key, v["bootstrap_balance"]])
delegate = v.get("delegate_to")
if delegate:
baker_key = accounts[delegate].get("pkh")
pubkey_and_balance_pairs.append([v.get("pk"), v["bootstrap_balance"], baker_key])
else:
pubkey_and_balance_pairs.append([key, v["bootstrap_balance"]])

return pubkey_and_balance_pairs

Expand Down