mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-02-24 06:57:51 +01:00
Give more descriptive error when there are no peers set (#1652)
This commit is contained in:
parent
20214ea821
commit
120cca072b
1 changed files with 6 additions and 9 deletions
|
@ -18,15 +18,7 @@ import org.bitcoins.db.AppConfig
|
|||
import org.bitcoins.feeprovider.BitcoinerLiveFeeRateProvider
|
||||
import org.bitcoins.node.config.NodeAppConfig
|
||||
import org.bitcoins.node.models.Peer
|
||||
import org.bitcoins.node.{
|
||||
Node,
|
||||
NodeCallbacks,
|
||||
OnBlockHeadersReceived,
|
||||
OnBlockReceived,
|
||||
OnCompactFiltersReceived,
|
||||
OnTxReceived,
|
||||
SpvNode
|
||||
}
|
||||
import org.bitcoins.node._
|
||||
import org.bitcoins.wallet.api._
|
||||
import org.bitcoins.wallet.config.WalletAppConfig
|
||||
|
||||
|
@ -69,6 +61,11 @@ object Main extends App with BitcoinSLogger {
|
|||
"Either Neutrino or SPV mode should be enabled")
|
||||
implicit val chainConf: ChainAppConfig = conf.chainConf
|
||||
|
||||
if (nodeConf.peers.isEmpty) {
|
||||
throw new IllegalArgumentException(
|
||||
"No peers specified, unable to start node")
|
||||
}
|
||||
|
||||
val peerSocket =
|
||||
NetworkUtil.parseInetSocketAddress(nodeConf.peers.head,
|
||||
nodeConf.network.port)
|
||||
|
|
Loading…
Add table
Reference in a new issue