Use the correct coin type

This commit is contained in:
Aditya Kulkarni
2019-10-01 17:30:35 -07:00
parent 99894411b2
commit 76980cb6b4
2 changed files with 11 additions and 2 deletions

View File

@@ -213,6 +213,15 @@ impl LightClientConfig {
}.parse().unwrap()
}
pub fn get_coin_type(&self) -> u32 {
match &self.chain_name[..] {
"main" => mainnet::COIN_TYPE,
"test" => testnet::COIN_TYPE,
"regtest" => regtest::COIN_TYPE,
c => panic!("Unknown chain {}", c)
}
}
pub fn hrp_sapling_address(&self) -> &str {
match &self.chain_name[..] {
"main" => mainnet::HRP_SAPLING_PAYMENT_ADDRESS,