pmiklos / obyte-devnet

Obyte network from scratch for development purposes
MIT License
15 stars 9 forks source link

sendMessageToDevice bug after bot restarts #25

Open mjdso13 opened 4 years ago

mjdso13 commented 4 years ago

Hi,

First, thank you for this great tool. Very useful.

I'm trying to develop 2 bots that have to communicate together and I'm experiencing a weird situation.

At the first run and after the pairing step, the "server" bot receives the "client" bot messages (sendMessageToDevice) and answer to it with success. The client bot receives the server bot messages and answer to it with success. And I can execute all tasks I have coded, inclusively payments, without any problem.

Once I restart the client bot, the server bot continues to receive the client bot messages but the client bot doesn't receive anymore the server bot messages. Finally, once I restart the server bot, the both sides don't receive anymore the other party messages. In normal execution mode, the client bot initiates the communication processus.

If I run the bots on the Obyte mainnet (I havent try on the testnet), this problem doesn't occur and I can restart the bots as many times I wish without any problem. To solve this problem on the devnet, I have to erase the database files from the bots config folder (I keep only the keys). It's an annoying manipulation. I tried to restart the hub and the witness but this manipulation doesnt solve the problem.

So, my question is what could cause this weird situation and how to solve it because there is no error message or warning in logs.

Thank you.