Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
fix: set capability index (informalsystems#1258)
Browse files Browse the repository at this point in the history
  • Loading branch information
yito88 committed Aug 16, 2021
1 parent 73f837f commit a5ca232
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Set the index of `ibc::ics05_port::capabilities::Capability` ([#1257])

[#1257]: https://github.com/informalsystems/ibc-rs/issues/1257
10 changes: 10 additions & 0 deletions modules/src/ics05_port/capabilities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,20 @@ impl Capability {
pub fn new() -> Capability {
Self { index: 0x0 }
}

pub fn index(&self) -> u64 {
self.index
}
}

impl Default for Capability {
fn default() -> Self {
Self::new()
}
}

impl From<u64> for Capability {
fn from(index: u64) -> Self {
Self { index }
}
}

0 comments on commit a5ca232

Please sign in to comment.