Example #1
0
 private void onBlock(ulong block_number)
 {
     lock (syncLock) {
         var passed = true;
         for (ulong block = (previousBlock + 1); block < block_number; block++)
         {
             dynamic block_response = Ethereum.GetBlockDetails(block);
             if (block_response != null)
             {
                 Print("recover block " + block_response.hash);
                 processBlockDetails(block_response, block_callback: false);
             }
             else
             {
                 Print("failed to recover block " + block);
                 passed = false;
                 break;
             }
         }
         if (passed)
         {
             previousBlock = block_number;
         }
     }
 }
Example #2
0
        public void processBlock(dynamic block, bool with_value = true)
        {
            if (block == null || block.hash == null || !isTypeValues(JTokenType.String, block.hash))
            {
                return;
            }

            dynamic block_response = Ethereum.GetBlockDetails((string)block.hash);

            processBlockDetails(block_response);
        }