diff --git a/charts/tezos/values.yaml b/charts/tezos/values.yaml index f9643d9aa..644aef79f 100644 --- a/charts/tezos/values.yaml +++ b/charts/tezos/values.yaml @@ -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: @@ -60,6 +61,7 @@ accounts: {} # type: public # is_bootstrap_baker_account: false # bootstrap_balance: "4000000000000" +# delegate_to: baker0 ## NODES ## diff --git a/utils/config-generator.py b/utils/config-generator.py index 5047ad1e4..af7e90314 100755 --- a/utils/config-generator.py +++ b/utils/config-generator.py @@ -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