This commit is contained in:
folex 2019-06-15 13:53:02 +02:00
parent f7f3fe61c1
commit 17abc4f045
2 changed files with 3 additions and 4 deletions

View File

@ -4,7 +4,6 @@ import java.nio.file.{Path, StandardOpenOption}
import java.util.concurrent.Executors
import cats.effect.{Concurrent, ContextShift, Resource, Sync}
import cats.syntax.functor._
import fs2.io.Watcher
import fs2.{Pull, text}
@ -31,13 +30,13 @@ class FileStream[F[_]: Sync: ContextShift: Concurrent](
.flatMap { case (start, end) => readRange(start, end) }
}
def readRange(start: Long, end: Long) =
private def readRange(start: Long, end: Long) =
fs2.io.file
.readRange[F](path, blocking, ChunkSize, start, end)
.through(text.utf8Decode)
.through(text.lines)
val fileSizeStream: fs2.Stream[F, Long] =
private val fileSizeStream: fs2.Stream[F, Long] =
fs2.io.file.pulls
.fromPath[F](path, blocking, Seq(StandardOpenOption.READ))
.flatMap(c => Pull.eval(c.resource.size))

View File

@ -14,7 +14,7 @@ case class Log(appName: String,
object Log {
/*
I[2019-06-13|01:07:31.417] Committed state module=state height=7096 txs=1 appHash=4A936D7C00A37D66C7CE38A1118E0BC31C97BEE68C70BA8A9365EE0126079DAE
I[2019-06-13|01:07:31.417] Committed state module=state height=7096 txs=1 appHash=4A936D7C00A37D66C7CE38A1118E0BC31C97BEE68C70BA8A9365EE0126079DAE
E[2019-06-13|01:07:33.678] CONSENSUS FAILURE!!! module=consensus err="Panicked on a Consensus Failure: +2/3 committed an invalid block: Wrong Block.Header.AppHash. Expected 4A936D7C00A37D66C7CE38A1118E0BC31C97BEE68C70BA8A9365EE0126079DAE, got 0113492DE4944A90AB6AB3B64D04EAB2D9257D8613FABCACB3CB341CAF79D490"
*/