618d3bcb00
Currently there are two possible situations related to low balance on the account which is used for bridge operations: 1. The account which is used to sign transactions to be addressed by ForeignBridge contract has low balance. So, the bridge is not able to do deposit_relay and withdraw_confirm. 2. The account which is used to sign transactions to be addressed by HomeBridge contract has low balance. So, the bridge is not able to do withdraw_relay. In both cases bridges hangs silently at the moment of sending transactions and does not proceed with further actions even the operation is intended to be performed in opposite direction (e.g. the bridge hangs at the moment to perform withdraw_relay, so deposit_relay cannot be performed either). Solution: make bridge track its balance and hande insufficient Bridge will crash with ERR_INSUFFICIENT_FUNDS (code 4) so that supervisor can decide what should happen next. It will also log the condition. P.S.Make sure to run the tests with `--test-threads=1` to avoid other test conflicting with this one. A better solution to this issue must be devised later, however. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
build.rs |