mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-02-23 06:45:21 +01:00
Add range of block heights to the error message (#3886)
This commit is contained in:
parent
0d37c4b54f
commit
a38309bed1
1 changed files with 6 additions and 7 deletions
|
@ -20,7 +20,6 @@ import org.bitcoins.zmq.ZMQSubscriber
|
|||
import java.util.concurrent.atomic.AtomicInteger
|
||||
import scala.concurrent.duration.{DurationInt, FiniteDuration}
|
||||
import scala.concurrent.{ExecutionContext, Future, Promise}
|
||||
import scala.util.{Failure, Success}
|
||||
|
||||
/** Useful utilities to use in the wallet project for syncing things against bitcoind */
|
||||
object BitcoindRpcBackendUtil extends Logging {
|
||||
|
@ -295,11 +294,11 @@ object BitcoindRpcBackendUtil extends Logging {
|
|||
} yield logger.debug(
|
||||
"Successfully polled bitcoind for new blocks")
|
||||
|
||||
requestsBlocksF.onComplete {
|
||||
case Success(_) => ()
|
||||
case Failure(err) =>
|
||||
requestsBlocksF.failed.foreach { case err =>
|
||||
val failedCount = atomicPrevCount.get
|
||||
atomicPrevCount.set(prevCount)
|
||||
logger.error("Requesting blocks from bitcoind polling failed",
|
||||
logger.error(
|
||||
s"Requesting blocks from bitcoind polling failed, range=[$prevCount, $failedCount]",
|
||||
err)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue