From 418f2fd4fa9b5ee87254ba87afb3819445b8229d Mon Sep 17 00:00:00 2001 From: Alexis Hernandez Date: Sun, 11 Nov 2018 11:08:23 -0700 Subject: [PATCH] server: Update the nonce from the Block model to Long --- .../com/xsn/explorer/data/anorm/parsers/BlockParsers.scala | 2 +- server/app/com/xsn/explorer/models/rpc/Block.scala | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/app/com/xsn/explorer/data/anorm/parsers/BlockParsers.scala b/server/app/com/xsn/explorer/data/anorm/parsers/BlockParsers.scala index 93403dd..79a0726 100644 --- a/server/app/com/xsn/explorer/data/anorm/parsers/BlockParsers.scala +++ b/server/app/com/xsn/explorer/data/anorm/parsers/BlockParsers.scala @@ -17,7 +17,7 @@ object BlockParsers { val parseHeight = int("height").map(Height.apply) val parseVersion = int("version") val parseMedianTime = long("median_time") - val parseNonce = int("nonce") + val parseNonce = long("nonce") val parseBits = str("bits") val parseChainwork = str("chainwork") val parseDifficulty = get[BigDecimal]("difficulty") diff --git a/server/app/com/xsn/explorer/models/rpc/Block.scala b/server/app/com/xsn/explorer/models/rpc/Block.scala index 018f63f..b2ac365 100644 --- a/server/app/com/xsn/explorer/models/rpc/Block.scala +++ b/server/app/com/xsn/explorer/models/rpc/Block.scala @@ -22,7 +22,7 @@ case class Block( version: Int, time: Long, medianTime: Long, - nonce: Int, + nonce: Long, bits: String, chainwork: String, difficulty: BigDecimal, @@ -57,7 +57,7 @@ object Block { (__ \ 'version).read[Int] and (__ \ 'time).read[Long] and (__ \ 'mediantime).read[Long] and - (__ \ 'nonce).read[Int] and + (__ \ 'nonce).read[Long] and (__ \ 'bits).read[String] and (__ \ 'chainwork).read[String] and (__ \ 'difficulty).read[BigDecimal] and