Exemple #1
0
        public static RpcBlock FromJson(JObject json)
        {
            RpcBlock block = new RpcBlock();

            block.Block         = Utility.BlockFromJson(json);
            block.Confirmations = (uint)json["confirmations"].AsNumber();
            block.NextBlockHash = json["nextblockhash"] is null ? null : UInt256.Parse(json["nextblockhash"].AsString());
            return(block);
        }
Exemple #2
0
        public static RpcBlock FromJson(JObject json)
        {
            RpcBlock block = new RpcBlock();

            block.Block = Block.FromJson(json);
            if (json["confirmations"] != null)
            {
                block.Confirmations = (int)json["confirmations"].AsNumber();
                block.NextBlockHash = UInt256.Parse(json["nextblockhash"].AsString());
            }
            return(block);
        }