Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions dash-network-ffi/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//! FFI bindings for dash-network library

use std::fmt;

use dash_network::Network as DashNetwork;

// Initialize function
Expand Down Expand Up @@ -70,10 +72,6 @@ impl NetworkInfo {
self.network.magic()
}

pub fn to_string(&self) -> String {
self.network.to_string()
}

pub fn is_core_v20_active(&self, block_height: u32) -> bool {
self.network.core_v20_is_active_at(block_height)
}
Expand All @@ -83,6 +81,12 @@ impl NetworkInfo {
}
}

impl fmt::Display for NetworkInfo {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
self.network.fmt(f)
}
}

#[cfg(test)]
mod tests {
use super::*;
Expand Down
Loading