在直接读区块文件的测试类中增加json的转换测试。

This commit is contained in:
jiangbuyun 2021-03-23 18:09:43 +08:00
parent 75982315de
commit ceebdca9b5
2 changed files with 11 additions and 0 deletions

View File

@ -60,6 +60,10 @@ libraryDependencies += "org.codehaus.janino" % "janino" % "3.0.12"
libraryDependencies += "org.bouncycastle" % "bcprov-jdk15on" % "1.61"
libraryDependencies += "javax.xml.bind" % "jaxb-api" % "2.3.1"
//add erasurecode for java
libraryDependencies += "org.apache.hadoop" % "hadoop-common" % "3.2.0"
libraryDependencies += "org.python" % "jython" % "2.7.2"
libraryDependencies ++= Seq(
// "io.swagger" % "swagger-jaxrs" % "1.6.0",
// "com.github.swagger-akka-http" %% "swagger-akka-http" % "1.1.1",

View File

@ -1,10 +1,17 @@
package rep.storage.test
import rep.storage.block.BlockFileDirectReader
import rep.utils.MessageToJson
object testDirectReadBlockFile extends App{
val reader = new BlockFileDirectReader("/Users/jiangbuyun/Repchain_BlockFile_50.log")
val block = reader.readBlockWithHeight(10192214)
try{
MessageToJson.toJson(block)
}catch {
case e:Exception=>
e.printStackTrace()
}
System.out.println(block)
//readBlockFile