Skip to content

Commit

Permalink
Remove pub from MockConsensusState::root field (#1259)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
3 people authored Jun 17, 2024
1 parent 588f7eb commit 8424f69
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,6 @@ mc.log

# Ignore CosmWasm artifacts
/cw-contracts

# Ignore dotenv
.env
1 change: 0 additions & 1 deletion ibc-core/ics03-connection/types/src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

use core::fmt::{Display, Error as FmtError, Formatter};
use core::time::Duration;
use core::u64;

use ibc_core_client_types::error::ClientError;
use ibc_core_commitment_types::commitment::CommitmentPrefix;
Expand Down
8 changes: 7 additions & 1 deletion ibc-testkit/src/testapp/ibc/clients/mock/consensus_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,17 @@ use crate::testapp::ibc::clients::mock::header::MockHeader;
use crate::testapp::ibc::clients::mock::proto::ConsensusState as RawMockConsensusState;
pub const MOCK_CONSENSUS_STATE_TYPE_URL: &str = "/ibc.mock.ConsensusState";

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

impl MockConsensusState {
Expand Down

0 comments on commit 8424f69

Please sign in to comment.