@@ -62,8 +62,8 @@ pub struct GenesisFlags {
62
62
pub enable_warmup_epochs : bool ,
63
63
pub max_genesis_archive_unpacked_size : Option < u64 > ,
64
64
pub cluster_type : String ,
65
- pub bootstrap_validator_sol : Option < f64 > ,
66
- pub bootstrap_validator_stake_sol : Option < f64 > ,
65
+ pub bootstrap_validator_sol : f64 ,
66
+ pub bootstrap_validator_stake_sol : f64 ,
67
67
pub commission : u8 ,
68
68
pub internal_node_sol : f64 ,
69
69
pub internal_node_stake_sol : f64 ,
@@ -180,6 +180,7 @@ impl Genesis {
180
180
for ( i, keypair) in keypairs. iter ( ) . enumerate ( ) {
181
181
let account_index = i / account_types. len ( ) ;
182
182
let account = & account_types[ i % account_types. len ( ) ] ;
183
+ info ! ( "Account: {account}, node_type: {node_type}" ) ;
183
184
let filename = match node_type {
184
185
NodeType :: Bootstrap => {
185
186
format ! ( "{node_type}/{account}.json" )
@@ -290,19 +291,9 @@ impl Genesis {
290
291
) -> Result < Vec < String > , Box < dyn Error > > {
291
292
let mut args = vec ! [
292
293
"--bootstrap-validator-lamports" . to_string( ) ,
293
- sol_to_lamports(
294
- self . flags
295
- . bootstrap_validator_sol
296
- . unwrap_or( DEFAULT_BOOTSTRAP_NODE_SOL ) ,
297
- )
298
- . to_string( ) ,
294
+ sol_to_lamports( self . flags. bootstrap_validator_sol) . to_string( ) ,
299
295
"--bootstrap-validator-stake-lamports" . to_string( ) ,
300
- sol_to_lamports(
301
- self . flags
302
- . bootstrap_validator_stake_sol
303
- . unwrap_or( DEFAULT_BOOTSTRAP_NODE_STAKE_SOL ) ,
304
- )
305
- . to_string( ) ,
296
+ sol_to_lamports( self . flags. bootstrap_validator_stake_sol) . to_string( ) ,
306
297
"--hashes-per-tick" . to_string( ) ,
307
298
self . flags. hashes_per_tick. clone( ) ,
308
299
"--max-genesis-archive-unpacked-size" . to_string( ) ,
@@ -360,7 +351,7 @@ impl Genesis {
360
351
361
352
if !self . flags . skip_primordial_stakes {
362
353
for i in 0 ..num_validators {
363
- args. push ( "--bootstrap -validator" . to_string ( ) ) ;
354
+ args. push ( "--internal -validator" . to_string ( ) ) ;
364
355
for account_type in [ "identity" , "vote-account" , "stake-account" ] . iter ( ) {
365
356
let path = self
366
357
. config_dir
@@ -371,6 +362,15 @@ impl Genesis {
371
362
args. push ( path) ;
372
363
}
373
364
}
365
+
366
+ // stake delegated from internal_node_sol
367
+ let internal_node_lamports =
368
+ self . flags . internal_node_sol - self . flags . internal_node_stake_sol ;
369
+ args. push ( "--internal-validator-lamports" . to_string ( ) ) ;
370
+ args. push ( sol_to_lamports ( internal_node_lamports) . to_string ( ) ) ;
371
+
372
+ args. push ( "--internal-validator-stake-lamports" . to_string ( ) ) ;
373
+ args. push ( sol_to_lamports ( self . flags . internal_node_stake_sol ) . to_string ( ) ) ;
374
374
}
375
375
376
376
if let Some ( slots_per_epoch) = self . flags . slots_per_epoch {
0 commit comments