Commit 6ada699f authored by Ralph Pichler's avatar Ralph Pichler Committed by GitHub

Goerli-specific logs (#777)

parent 4f37397c
......@@ -175,6 +175,7 @@ func NewBee(addr string, swarmAddress swarm.Address, publicKey ecdsa.PublicKey,
chainID, err := swapBackend.ChainID(p2pCtx)
if err != nil {
logger.Infof("could not connect to backend at %v. In a swap-enabled network a working blockchain node (for goerli network in production) is required. Check your node or specify another node using --swap-endpoint.", o.SwapEndpoint)
return nil, fmt.Errorf("could not get chain id from ethereum backend: %w", err)
}
......@@ -208,6 +209,7 @@ func NewBee(addr string, swarmAddress swarm.Address, publicKey ecdsa.PublicKey,
o.SwapInitialDeposit,
transactionService,
swapBackend,
chainID.Int64(),
overlayEthAddress,
chequeSigner,
chequebook.NewSimpleSwapBindings,
......
......@@ -26,6 +26,7 @@ func Init(
swapInitialDeposit uint64,
transactionService TransactionService,
swapBackend Backend,
chainId int64,
overlayEthAddress common.Address,
chequeSigner ChequeSigner,
simpleSwapBindingFunc SimpleSwapBindingFunc,
......@@ -63,7 +64,11 @@ func Init(
}
if balance.Cmp(big.NewInt(int64(swapInitialDeposit))) < 0 {
return nil, fmt.Errorf("insufficient token for initial deposit. Please make sure there is sufficient eth and bzz available on %x", overlayEthAddress)
logger.Warningf("please make sure there is sufficient eth and bzz available on %x.", overlayEthAddress)
if chainId == 5 {
logger.Warning("on goerli you can get both goerli eth and goerli bzz from https://faucet.ethswarm.org.")
}
return nil, fmt.Errorf("insufficient token for initial deposit")
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment