Skip to content

Commit

Permalink
Updates chain field of getmininginfo response
Browse files Browse the repository at this point in the history
  • Loading branch information
arya2 committed Dec 8, 2022
1 parent 814ce64 commit 6e94c14
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ pub struct Response {
networkhashps: u128,

/// Current network name as defined in BIP70 (main, test, regtest)
chain: Network,
chain: String,

/// If using testnet or not
testnet: bool,
}

impl Response {
/// Creates a new `getmininginfo` response
pub fn new(chain: Network, networksolps: u128) -> Self {
pub fn new(network: Network, networksolps: u128) -> Self {
Self {
networksolps,
networkhashps: networksolps,
chain,
testnet: chain == Network::Testnet,
chain: network.bip70_network_name(),
testnet: network == Network::Testnet,
}
}
}

0 comments on commit 6e94c14

Please sign in to comment.