monorepo
monorepo copied to clipboard
[node] The Node ought to emit an event when it has identified a counterparty as being offline
Presently when running any of the protocols and a counterparty is not responsive the Node will throw an error inside of the IO_SEND_AND_WAIT
function implementation after 60 seconds. This error is non-specific to what the cause was. The same kind of error could be thrown due to a bad DB connection or just a slow internet connection.
This issue is to have the Node trigger an event specifically when it has decided that a counterparty has taken too long to respond to a message. The timeout should be a Node process constant for now, still at 60 seconds. The event should be something like "COUNTERPARTY_UNRESPONSIVE" with metadata including the channel ID, the app instance ID (if applicable), and the protocol they were unresponsive to.