Beispiel #1
0
        public static RpcBlockHeader FromJson(JObject json)
        {
            RpcBlockHeader block = new RpcBlockHeader();

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

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