diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/AbstractHead.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/AbstractHead.kt index 7aa700b4..67424830 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/AbstractHead.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/AbstractHead.kt @@ -74,7 +74,7 @@ abstract class AbstractHead @JvmOverloads constructor( } return source .filter { - log.debug("Filtering block $upstreamId block $it") + log.trace("Filtering block $upstreamId block $it") forkChoice.filter(it) } .doFinally { @@ -85,7 +85,7 @@ abstract class AbstractHead @JvmOverloads constructor( log.warn("Received signal $upstreamId $it unexpectedly - restart head") lastHeadUpdated = 0L } else { - log.warn("Received signal $upstreamId $it - stop emit new head!!!") + log.warn("Received signal $upstreamId $it - stop emit new head") completed = true stream.tryEmitComplete() } diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/DefaultUpstream.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/DefaultUpstream.kt index 4b3d1624..392ca44c 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/DefaultUpstream.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/DefaultUpstream.kt @@ -84,7 +84,7 @@ abstract class DefaultUpstream( Status(curr.lag, avail, statusByLag(curr.lag, avail)) }.also { statusStream.emitNext(it.status) { _, res -> res == Sinks.EmitResult.FAIL_NON_SERIALIZED } - log.debug("Status of upstream [$id] changed to [$it], requested change status to [$avail]") + log.trace("Status of upstream [$id] changed to [$it], requested change status to [$avail]") } } @@ -114,7 +114,7 @@ abstract class DefaultUpstream( Status(nLag, curr.avail, statusByLag(nLag, curr.avail)) }.also { statusStream.emitNext(it.status) { _, res -> res == Sinks.EmitResult.FAIL_NON_SERIALIZED } - log.debug("Status of upstream [$id] changed to [$it], requested change lag to [$lag]") + log.trace("Status of upstream [$id] changed to [$it], requested change lag to [$lag]") } } } diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/WsConnectionImpl.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/WsConnectionImpl.kt index e20ce4bd..103cb4ac 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/WsConnectionImpl.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/WsConnectionImpl.kt @@ -245,7 +245,7 @@ open class WsConnectionImpl( } onMessage(msg) } catch (t: Throwable) { - log.warn("Failed to process WS message. ${t.javaClass}: ${t.message}") + log.warn("Failed to process WS message. ${t.javaClass}: ${t.message}. Message: ${String(it)}") Mono.empty() } } diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/forkchoice/PriorityForkChoice.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/forkchoice/PriorityForkChoice.kt index e68399df..ffcbe65e 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/forkchoice/PriorityForkChoice.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/forkchoice/PriorityForkChoice.kt @@ -27,23 +27,23 @@ class PriorityForkChoice : ForkChoice { override fun choose(block: BlockContainer): ForkChoice.ChoiceResult { head.get()?.let { - log.debug("Candidate for priority forkchoice (${block.height}, ${block.nodeRating}), current is (${it.height},${it.nodeRating})") + log.trace("Candidate for priority forkchoice (${block.height}, ${block.nodeRating}), current is (${it.height},${it.nodeRating})") } val nwhead = head.updateAndGet { curr -> if (!filter(block)) { - log.debug("Preparing to deny block ${block.height}") + log.trace("Preparing to deny block ${block.height}") curr } else { - log.debug("Preparing to accept block ${block.height}") + log.trace("Preparing to accept block ${block.height}") seenBlocks.put(block.hash, true) block } } if (nwhead.hash == block.hash) { - log.debug("Accepted block ${block.height}") + log.trace("Accepted block ${block.height}") return ForkChoice.ChoiceResult.Updated(nwhead) } - log.debug("Denied block ${block.height}") + log.trace("Denied block ${block.height}") return ForkChoice.ChoiceResult.Same(nwhead) } }