solution: revise for the latest etherjar

This commit is contained in:
Igor Artamonov
2019-10-26 23:33:12 -04:00
parent bc6fd4d1db
commit 90648ecd8c
4 changed files with 14 additions and 11 deletions

View File

@@ -52,7 +52,7 @@ class StreamHead(
return BlockchainOuterClass.ChainHead.newBuilder()
.setChainValue(chain.id)
.setHeight(block.number)
.setTimestamp(block.timestamp.time)
.setTimestamp(block.timestamp.toEpochMilli())
.setWeight(ByteString.copyFrom(block.totalDifficulty.toByteArray()))
.setBlockId(block.hash.toHex().substring(2))
.build()

View File

@@ -197,7 +197,7 @@ class TrackTx(
return if (block.number != null && block.totalDifficulty != null) {
tx.withStatus(
blockTotalDifficulty = block.totalDifficulty,
blockTime = block.timestamp.toInstant()
blockTime = block.timestamp
)
} else {
tx.withStatus(