Skip to content
Merged
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
2 changes: 1 addition & 1 deletion ledger-tool/src/ledger_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ pub fn load_and_process_ledger(
exit.clone(),
abs_request_handler,
process_options.accounts_db_test_hash_calculation,
None,
starting_snapshot_hashes.map(|x| x.full.0 .0),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

what's with the extra space after x.full.0?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

🤷 That's how cargo-fmt does it whenever there are multiple tuples.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Some more context/info:

In the validator, here's where we start AccountsBackgroundService, and get/pass in the last full snapshot slot:

agave/core/src/validator.rs

Lines 820 to 830 in 46e42f3

let last_full_snapshot_slot = starting_snapshot_hashes.map(|x| x.full.0 .0);
let accounts_background_service = AccountsBackgroundService::new(
bank_forks.clone(),
exit.clone(),
AbsRequestHandlers {
snapshot_request_handler,
pruned_banks_request_handler,
},
config.accounts_db_test_hash_calculation,
last_full_snapshot_slot,
);

In ledger-tool, when actually creating the incremental snapshot, we also do the same thing:

agave/ledger-tool/src/main.rs

Lines 2265 to 2285 in 46e42f3

let full_snapshot_slot = starting_snapshot_hashes.unwrap().full.0 .0;
if bank.slot() <= full_snapshot_slot {
eprintln!(
"Unable to create incremental snapshot: Slot must be greater \
than full snapshot slot. slot: {}, full snapshot slot: {}",
bank.slot(),
full_snapshot_slot,
);
exit(1);
}
let incremental_snapshot_archive_info =
snapshot_bank_utils::bank_to_incremental_snapshot_archive(
ledger_path,
&bank,
full_snapshot_slot,
Some(snapshot_version),
output_directory.clone(),
output_directory,
snapshot_archive_format,
)

The changes to ABS in leder-tool now make it consistent with the validator.

);

let enable_rpc_transaction_history = arg_matches.is_present("enable_rpc_transaction_history");
Expand Down