private bool ValidatePoolAddress(bool newWallet) { try { if (newWallet == true) { var result = _daemonClient.ValidateAddress(_poolConfig.Wallet.Adress); var resultnew = _daemonClient.GetAddressInfo(_poolConfig.Wallet.Adress); if (result.IsValid && resultnew.IsMine) { return(true); } _logger.Error("Halted as daemon we are connected to does not own the pool address: {0:l}.", _poolConfig.Wallet.Adress); return(false); } else { var result = _daemonClient.ValidateAddress(_poolConfig.Wallet.Adress); // make sure the pool central wallet address is valid and belongs to the daemon we are connected to. if (result.IsValid && result.IsMine) { return(true); } _logger.Error("Halted as daemon we are connected to does not own the pool address: {0:l}.", _poolConfig.Wallet.Adress); return(false); } } catch (Exception e) { _logger.Error("Halted as we can not connect to configured coin daemon: {0:l}", e.Message); return(false); } }