From dcf4cc6471ce96f08a6c3ae4957721a17238869b Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 21 Oct 2022 04:17:08 +0000 Subject: [PATCH] ledger-tool: remove inefficient base58 encoding options (backport #28488) (#28494) ledger-tool: encode account data with base64 instead of slow base58 Co-authored-by: Trent Nelson --- Cargo.lock | 2 +- ledger-tool/Cargo.toml | 2 +- ledger-tool/src/main.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c9d387347e..95d7e0df24 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5480,7 +5480,7 @@ name = "solana-ledger-tool" version = "1.13.5" dependencies = [ "assert_cmd", - "bs58", + "base64 0.13.0", "bytecount", "clap 2.33.3", "crossbeam-channel", diff --git a/ledger-tool/Cargo.toml b/ledger-tool/Cargo.toml index c591b70b59..683d6527d2 100644 --- a/ledger-tool/Cargo.toml +++ b/ledger-tool/Cargo.toml @@ -10,7 +10,7 @@ homepage = "https://solana.com/" documentation = "https://docs.rs/solana-ledger-tool" [dependencies] -bs58 = "0.4.0" +base64 = "0.13.0" clap = "2.33.1" crossbeam-channel = "0.5" csv = "1.1.6" diff --git a/ledger-tool/src/main.rs b/ledger-tool/src/main.rs index e251519bcd..674a19778f 100644 --- a/ledger-tool/src/main.rs +++ b/ledger-tool/src/main.rs @@ -2679,7 +2679,7 @@ fn main() { println!(" - slot: {}", slot); println!(" - rent_epoch: {}", account.rent_epoch()); if print_account_data { - println!(" - data: '{}'", bs58::encode(account.data()).into_string()); + println!(" - data: '{}'", base64::encode(account.data())); } println!(" - data_len: {}", data_len); }