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