2

Create a transaction to send money, then it needs to be "registered" in the system, before doing so :

using (var node = Node.Connect(Network.Main, node_address))//, node_address
  {
                try
                {
                    node.VersionHandshake();


                    node.SendMessage(new InvPayload(transaction));

                    node.SendMessage(new TxPayload(transaction));
                    Thread.Sleep(500);
                }
                catch { }
            }

sometimes the error "the node is not in a connected state" appears on the node.VersionHandshake (); but the money was sent, changing the node did not help.

Then changed a bit code :

using (var node = Node.Connect(Network.Main))//, node_address
{
    try
    {
        node.VersionHandshake();


        node.SendMessage(new InvPayload(transaction));

        node.SendMessage(new TxPayload(transaction));
        Thread.Sleep(500);
    }
    catch { }
}

I do not prescribe a node, but transactions are registered, but sometimes the error of the node is not in a connected state still appears, but since the money is successfully sent, I just catch exceptions, everything would be fine, but today, with the next test, this error came out again, but the money did not go. And here the question arises, what can be done? it is one thing if money would not always go with such an error, then it would be possible to catch an exception and change the node (somewhere I read that the error is on the side of the node), but the money is sent, though not always.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.