diff --git a/.changelog/unreleased/improvements/1077-private-key-clone.md b/.changelog/unreleased/improvements/1077-private-key-clone.md new file mode 100644 index 000000000..234d4ffb3 --- /dev/null +++ b/.changelog/unreleased/improvements/1077-private-key-clone.md @@ -0,0 +1,2 @@ +- `[tendermint]` Implement `Clone` for `PrivateKey` + ([#1077](https://github.com/informalsystems/tendermint-rs/issues/1077)) \ No newline at end of file diff --git a/tendermint/src/private_key.rs b/tendermint/src/private_key.rs index 0c0989f54..893dfaa87 100644 --- a/tendermint/src/private_key.rs +++ b/tendermint/src/private_key.rs @@ -12,7 +12,7 @@ use zeroize::Zeroizing; pub const ED25519_KEYPAIR_SIZE: usize = 64; /// Private keys as parsed from configuration files -#[derive(Serialize, Deserialize)] +#[derive(Serialize, Deserialize, Clone)] #[non_exhaustive] #[serde(tag = "type", content = "value")] // JSON custom serialization for priv_validator_key.json pub enum PrivateKey {