Browse Source

server: Update the nonce from the Block model to Long

prometheus-integration
Alexis Hernandez 6 years ago
parent
commit
418f2fd4fa
  1. 2
      server/app/com/xsn/explorer/data/anorm/parsers/BlockParsers.scala
  2. 4
      server/app/com/xsn/explorer/models/rpc/Block.scala

2
server/app/com/xsn/explorer/data/anorm/parsers/BlockParsers.scala

@ -17,7 +17,7 @@ object BlockParsers {
val parseHeight = int("height").map(Height.apply) val parseHeight = int("height").map(Height.apply)
val parseVersion = int("version") val parseVersion = int("version")
val parseMedianTime = long("median_time") val parseMedianTime = long("median_time")
val parseNonce = int("nonce") val parseNonce = long("nonce")
val parseBits = str("bits") val parseBits = str("bits")
val parseChainwork = str("chainwork") val parseChainwork = str("chainwork")
val parseDifficulty = get[BigDecimal]("difficulty") val parseDifficulty = get[BigDecimal]("difficulty")

4
server/app/com/xsn/explorer/models/rpc/Block.scala

@ -22,7 +22,7 @@ case class Block(
version: Int, version: Int,
time: Long, time: Long,
medianTime: Long, medianTime: Long,
nonce: Int, nonce: Long,
bits: String, bits: String,
chainwork: String, chainwork: String,
difficulty: BigDecimal, difficulty: BigDecimal,
@ -57,7 +57,7 @@ object Block {
(__ \ 'version).read[Int] and (__ \ 'version).read[Int] and
(__ \ 'time).read[Long] and (__ \ 'time).read[Long] and
(__ \ 'mediantime).read[Long] and (__ \ 'mediantime).read[Long] and
(__ \ 'nonce).read[Int] and (__ \ 'nonce).read[Long] and
(__ \ 'bits).read[String] and (__ \ 'bits).read[String] and
(__ \ 'chainwork).read[String] and (__ \ 'chainwork).read[String] and
(__ \ 'difficulty).read[BigDecimal] and (__ \ 'difficulty).read[BigDecimal] and

Loading…
Cancel
Save