1. Added both options for measuring space usage using total accounts usage and for individual store shrink ratio using an enum. Validator CLI options: --accounts-shrink-optimize-total-space and --accounts-shrink-ratio 2. Added code for selecting candidates based on total usage in a separate function select_candidates_by_total_usage 3. Added unit tests for the new functions added 4. The default implementations is kept at 0.8 shrink ratio with --accounts-shrink-optimize-total-space set to true Fixes #17544
This commit is contained in:
@@ -106,6 +106,7 @@ mod tests {
|
||||
None,
|
||||
AccountSecondaryIndexes::default(),
|
||||
false,
|
||||
accounts_db::AccountShrinkThreshold::default(),
|
||||
);
|
||||
bank0.freeze();
|
||||
let mut bank_forks = BankForks::new(bank0);
|
||||
@@ -165,6 +166,7 @@ mod tests {
|
||||
AccountSecondaryIndexes::default(),
|
||||
false,
|
||||
None,
|
||||
accounts_db::AccountShrinkThreshold::default(),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
|
Reference in New Issue
Block a user