Exemplo n.º 1
0
        private void SendBlock(Block block)
        {
            // Serialize transaction as JSON data first
            string blk = Serialize.SerializeBlock(block);

            // Send Block
            network.BroadcastBlock(blk);

            // Show confirmation
            //MessageBox.Show("Block content sent: \n\n" + blk);
        }
Exemplo n.º 2
0
        private void SendBlockAtHeight(PacketHeader packetHeader, Connection connection, Tuple <string, int> blockRequest)
        {
            // Serialize transaction as JSON data first
            string blk = Serialize.SerializeBlock(chain.ElementAt(blockRequest.Item2));

            // Broadcast to network via TCP
            NetworkComms.SendObject("SendBlock", blockRequest.Item1, network.serverPort, blk);

            // Show confirmation
            //MessageBox.Show("Block content sent: \n\n" + blk);
        }