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); }
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); }