BlockStatus.fromJson constructor

BlockStatus.fromJson(
  1. Map<String, dynamic> json
)

Implementation

BlockStatus.fromJson(Map<String, dynamic> json) {
  inBestChain = json['in_best_chain'];
  if (inBestChain == true) {
    height = json['height'];
    nextBest = json['next_best'];
    isNonnegativeInt(height!);
    isEqual(nextBest!.length, 64);
  } else {
    height = null;
    nextBest = null;
  }
}