mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-03-03 18:47:38 +01:00
Neutrino Logging (#1382)
This commit is contained in:
parent
6d7685b76e
commit
fddca91e79
2 changed files with 19 additions and 1 deletions
|
@ -238,7 +238,13 @@ case class ChainHandler(
|
||||||
}
|
}
|
||||||
} else FutureUtil.unit
|
} else FutureUtil.unit
|
||||||
_ <- filterHeaderDAO.createAll(filterHeadersToCreate)
|
_ <- filterHeaderDAO.createAll(filterHeadersToCreate)
|
||||||
} yield this
|
} yield {
|
||||||
|
val minHeight = filterHeadersToCreate.minBy(_.height)
|
||||||
|
val maxHeight = filterHeadersToCreate.maxBy(_.height)
|
||||||
|
logger.info(
|
||||||
|
s"Processed filters headers from height=${minHeight.height} to ${maxHeight.height}. Best hash=${maxHeight.blockHashBE}")
|
||||||
|
this
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @inheritdoc */
|
/** @inheritdoc */
|
||||||
|
@ -280,6 +286,10 @@ case class ChainHandler(
|
||||||
}
|
}
|
||||||
_ <- filterDAO.createAll(compactFilterDbs)
|
_ <- filterDAO.createAll(compactFilterDbs)
|
||||||
} yield {
|
} yield {
|
||||||
|
val minHeight = compactFilterDbs.minBy(_.height)
|
||||||
|
val maxHeight = compactFilterDbs.maxBy(_.height)
|
||||||
|
logger.info(
|
||||||
|
s"Processed filters from height=${minHeight.height} to ${maxHeight.height}. Best hash=${maxHeight.blockHashBE}")
|
||||||
this
|
this
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -136,7 +136,15 @@ trait Node extends NodeApi with ChainQueryApi with P2PLogger {
|
||||||
this
|
this
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// get chainApi so we don't need to call chainApiFromDb on every call
|
||||||
|
chainApi <- chainApiFromDb
|
||||||
|
bestHash <- chainApi.getBestBlockHash()
|
||||||
|
bestHeight <- chainApi.getBestHashBlockHeight()
|
||||||
|
filterCount <- chainApi.getFilterCount
|
||||||
|
filterHeaderCount <- chainApi.getFilterHeaderCount
|
||||||
} yield {
|
} yield {
|
||||||
|
logger.info(
|
||||||
|
s"Started node, best block hash ${bestHash.hex} at height $bestHeight, with $filterHeaderCount filter headers and $filterCount filers")
|
||||||
node
|
node
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue