Skip to content

Commit 928900e

Browse files
authored
Port of #4603 to Conway (#4605)
## Motivation The oversights after #4570 are also present on `testnet_conway` ## Proposal Port #4603 to `testnet_conway` ## Test Plan CI ## Release Plan - Nothing to do / These changes follow the usual release cycle. ## Links - [reviewer checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
1 parent e3fadf7 commit 928900e

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

CLI.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Client implementation and command-line tool for the Linera blockchain
111111
* `assign` — Link the owner to the chain. Expects that the caller has a private key corresponding to the `public_key`, otherwise block proposals will fail when signing with it
112112
* `retry-pending-block` — Retry a block we unsuccessfully tried to propose earlier
113113
* `wallet` — Show the contents of the wallet
114-
* `chain` — Show the contents of the wallet
114+
* `chain` — Show the information about a chain
115115
* `project` — Manage Linera projects
116116
* `net` — Manage a local Linera Network
117117
* `storage` — Operation on the storage
@@ -1016,7 +1016,7 @@ Forgets the specified chain, including the associated key pair
10161016

10171017
## `linera chain`
10181018

1019-
Show the contents of the wallet
1019+
Show the information about a chain
10201020

10211021
**Usage:** `linera chain <COMMAND>`
10221022

linera-base/src/crypto/hash.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ impl fmt::Display for CryptoHash {
168168

169169
impl fmt::Debug for CryptoHash {
170170
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
171-
write!(f, "{}", hex::encode(&self.0[..8]))
171+
write!(f, "{}", hex::encode(self.0))
172172
}
173173
}
174174

linera-base/src/identifiers.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ impl fmt::Debug for AccountOwner {
4545
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4646
match self {
4747
Self::Reserved(byte) => f.debug_tuple("Reserved").field(byte).finish(),
48-
Self::Address32(hash) => write!(f, "Address32({:?}..)", hash),
49-
Self::Address20(bytes) => write!(f, "Address20({}..)", hex::encode(&bytes[..8])),
48+
Self::Address32(hash) => write!(f, "Address32({:?})", hash),
49+
Self::Address20(bytes) => write!(f, "Address20({})", hex::encode(bytes)),
5050
}
5151
}
5252
}

linera-base/src/unit_tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ fn chain_ownership_test_case() -> ChainOwnership {
160160
fn account_owner_debug_format() {
161161
assert_eq!(&format!("{:?}", AccountOwner::Reserved(10)), "Reserved(10)");
162162
let addr32 = AccountOwner::Address32(CryptoHash::from([10u8; 32]));
163-
let debug32 = "Address32(0a0a0a0a0a0a0a0a..)";
163+
let debug32 = "Address32(0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a)";
164164
assert_eq!(&format!("{addr32:?}"), debug32);
165165
let addr20 = AccountOwner::Address20([10u8; 20]);
166-
let debug20 = "Address20(0a0a0a0a0a0a0a0a..)";
166+
let debug20 = "Address20(0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a)";
167167
assert_eq!(&format!("{addr20:?}"), debug20);
168168
}

linera-service/src/cli/command.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ pub enum ClientCommand {
913913
#[command(subcommand)]
914914
Wallet(WalletCommand),
915915

916-
/// Show the contents of the wallet.
916+
/// Show the information about a chain.
917917
#[command(subcommand)]
918918
Chain(ChainCommand),
919919

0 commit comments

Comments
 (0)