Exemplo n.º 1
0
        private static void BroadcastRPC()
        {
            Client        client    = new Client(privateKey, Network.Test);
            NodeRPCClient clientRPC = new NodeRPCClient("wss://seed-pre-s3.binance.org/websocket");

            //Streamline send 20 times
            for (int i = 0; i < 20; i++)
            {
                var msg  = BroadcastMessageBuilder.BuildTokenFreezeMessage("BNB", (decimal)0.001, client.Wallet);
                var resp = clientRPC.BroadcastTransaction(msg, RPCBroadcastMode.async);
                client.Wallet.IncrementSequence();
                cwf(resp);
            }
        }
Exemplo n.º 2
0
        public async void ConnectToBootNode()
        {
            if (ClientNodeServiceState.Halted == this.serviceState)
            {
                this.serviceState = ClientNodeServiceState.RetryingConnectionToBootNode;
            }
            else
            {
                this.serviceState = ClientNodeServiceState.ConnectingToBootNode;
            }

            NodeRPCClient client = new NodeRPCClient(Program.SystemOptions);

            if (true == client.ConnectToBootNode().Result)
            {
                this.serviceState = ClientNodeServiceState.Running;
            }
            else
            {
                this.serviceState = ClientNodeServiceState.Halted;
            }
        }