Skip to content

Commit 8424f69

Browse files
seanchen1991rnbguy
andauthored
Remove pub from MockConsensusState::root field (#1259)
* Remove `pub` from root field * Add incomplete comment to `MockConsensusState` * Comment formatting * Address rust 1.79 clippy error * Improve MockConsensusState doc comment * ignore dotenv file * add doc links in doc comment --------- Co-authored-by: Ranadeep Biswas <[email protected]> Co-authored-by: Rano | Ranadeep <[email protected]>
1 parent 588f7eb commit 8424f69

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,6 @@ mc.log
3434

3535
# Ignore CosmWasm artifacts
3636
/cw-contracts
37+
38+
# Ignore dotenv
39+
.env

ibc-core/ics03-connection/types/src/connection.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
33
use core::fmt::{Display, Error as FmtError, Formatter};
44
use core::time::Duration;
5-
use core::u64;
65

76
use ibc_core_client_types::error::ClientError;
87
use ibc_core_commitment_types::commitment::CommitmentPrefix;

ibc-testkit/src/testapp/ibc/clients/mock/consensus_state.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,17 @@ use crate::testapp::ibc::clients::mock::header::MockHeader;
99
use crate::testapp::ibc::clients::mock::proto::ConsensusState as RawMockConsensusState;
1010
pub const MOCK_CONSENSUS_STATE_TYPE_URL: &str = "/ibc.mock.ConsensusState";
1111

12+
/// The mock consensus state type used within ibc-testkit for testing situations
13+
/// when a consensus state is required.
14+
///
15+
/// Note, this type slightly differs from the [`RawMockConsensusState`] type exposed by
16+
/// ibc-proto. It contains a (private) `root` field to easily return a
17+
/// reference to the mock consensus state's dummy [`CommitmentRoot`].
1218
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1319
#[derive(Clone, Debug, PartialEq, Eq)]
1420
pub struct MockConsensusState {
1521
pub header: MockHeader,
16-
pub root: CommitmentRoot,
22+
root: CommitmentRoot,
1723
}
1824

1925
impl MockConsensusState {

0 commit comments

Comments
 (0)