The accounts command currently dumps every single account in the
AccountsDb. This is obviously a lot of output, so a previous change
streamed the accounts instead of collecting and dumping at the end.
The streaming approach is much more performant, but the implementation
is non-trivial. This change
- Moves the accounts output code to output.rs
- Refactor the logic to several objects that implment the functionality
- Adjust the json output to also include the summary
This change lays the groundwork for cleanly adding several more flags
that will allow for querying different subsets of accounts.
* Add cli flag to show entry data
* Add display structs
* Add writeln_entry helper fn
* Add entry conversion method
* Populate Display for CliBlockWithEntries
* Add ctor from flattened block and entries iterator
* Support show_entries
* Add helper to get a protobuf cell without bothering with bincode
* Add conversion back to EntrySummaries
* Add LedgerStorage::get_block_entries
* Add ledger-tool bigtable entries subcommand
* Move CliEntries into ledger_tool::output for now
* Fetch entries with read-only token
Introduce a struct to store all of the relevant slot/root information, and then output all in one go at the end as either human-readable or json. There are some slight changes to the human-readable format for the case of an empty ledger