mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-30 18:43:42 +02:00
chainreg: let IsTestnet consider bitcoin only
This commit is contained in:
committed by
Olaoluwa Osuntokun
parent
d128c18cc5
commit
a76bdf606b
@ -4,7 +4,6 @@ import (
|
|||||||
bitcoinCfg "github.com/btcsuite/btcd/chaincfg"
|
bitcoinCfg "github.com/btcsuite/btcd/chaincfg"
|
||||||
bitcoinWire "github.com/btcsuite/btcd/wire"
|
bitcoinWire "github.com/btcsuite/btcd/wire"
|
||||||
"github.com/lightningnetwork/lnd/keychain"
|
"github.com/lightningnetwork/lnd/keychain"
|
||||||
litecoinWire "github.com/ltcsuite/ltcd/wire"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// BitcoinNetParams couples the p2p parameters of a network with the
|
// BitcoinNetParams couples the p2p parameters of a network with the
|
||||||
@ -57,10 +56,5 @@ var BitcoinRegTestNetParams = BitcoinNetParams{
|
|||||||
// IsTestnet tests if the givern params correspond to a testnet
|
// IsTestnet tests if the givern params correspond to a testnet
|
||||||
// parameter configuration.
|
// parameter configuration.
|
||||||
func IsTestnet(params *BitcoinNetParams) bool {
|
func IsTestnet(params *BitcoinNetParams) bool {
|
||||||
switch params.Params.Net {
|
return params.Params.Net == bitcoinWire.TestNet3
|
||||||
case bitcoinWire.TestNet3, bitcoinWire.BitcoinNet(litecoinWire.TestNet4):
|
|
||||||
return true
|
|
||||||
default:
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user