omni / poa-bridge

POA <-> Ethereum bridge for self transfers of POA native token to POA20 (ERC20 representation). Not supported. Use TokenBridge instead
https://github.com/poanetwork/token-bridge
GNU General Public License v3.0
80 stars 39 forks source link

Problem: unknown balance warning #40

Closed yrashk closed 6 years ago

yrashk commented 6 years ago

Upon startup, bridge produces the following warning:

WARN:bridge::bridge::deposit_relay: foreign contract balance is unknown

This happens because the RPC response from the node might not come/get processed immediately.

By itself this warning means that the deposit_relay won't perform any operations.

Solution: don't commence operations until balances are retrieved

Also, indicate when balances are retrieved:

INFO:bridge::bridge: Retrieved home contract balance
INFO:bridge::bridge: Retrieved foreign contract balance

This shows us that the balances are successfully retrieved and bridge can commence its operations.