Properly handle the Signet network

Closes #62
This commit is contained in:
Alekos Filini
2021-02-05 10:23:17 -05:00
parent 19eca4e2d1
commit fedd92c022
5 changed files with 25 additions and 13 deletions

View File

@@ -55,9 +55,14 @@ pub type ValidNetworks = HashSet<Network>;
/// Create a set containing mainnet, testnet and regtest
pub fn any_network() -> ValidNetworks {
vec![Network::Bitcoin, Network::Testnet, Network::Regtest]
.into_iter()
.collect()
vec![
Network::Bitcoin,
Network::Testnet,
Network::Regtest,
Network::Signet,
]
.into_iter()
.collect()
}
/// Create a set only containing mainnet
pub fn mainnet_network() -> ValidNetworks {
@@ -65,7 +70,7 @@ pub fn mainnet_network() -> ValidNetworks {
}
/// Create a set containing testnet and regtest
pub fn test_networks() -> ValidNetworks {
vec![Network::Testnet, Network::Regtest]
vec![Network::Testnet, Network::Regtest, Network::Signet]
.into_iter()
.collect()
}