mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2024-11-19 09:52:09 +01:00
Change requesting filters log to use big endian hashes (#2048)
This commit is contained in:
parent
1b57cac8ae
commit
795d62c041
@ -8,4 +8,10 @@ import org.bitcoins.crypto.DoubleSha256Digest
|
||||
* of filters sent back to us by our peer
|
||||
* @see https://github.com/bitcoin/bips/blob/master/bip-0157.mediawiki#cfheaders
|
||||
*/
|
||||
case class FilterSyncMarker(startHeight: Int, stopBlockHash: DoubleSha256Digest)
|
||||
case class FilterSyncMarker(
|
||||
startHeight: Int,
|
||||
stopBlockHash: DoubleSha256Digest) {
|
||||
|
||||
override def toString: String =
|
||||
s"FilterSyncMarker(startHeight = $stopBlockHash, stopBlockHash=${stopBlockHash.flip.hex})"
|
||||
}
|
||||
|
@ -197,8 +197,7 @@ case class PeerMessageSender(client: P2PClient)(implicit conf: NodeAppConfig)
|
||||
chainApi.nextFilterHeaderBatchRange(stopHash, filterBatchSize)
|
||||
res <- filterSyncMarkerOpt match {
|
||||
case Some(filterSyncMarker) =>
|
||||
logger.info(
|
||||
s"Requesting compact filters from=${filterSyncMarker.startHeight} to=${filterSyncMarker.stopBlockHash}")
|
||||
logger.info(s"Requesting compact filters from $filterSyncMarker")
|
||||
|
||||
sendGetCompactFiltersMessage(filterSyncMarker)
|
||||
.map(_ => true)
|
||||
@ -220,7 +219,7 @@ case class PeerMessageSender(client: P2PClient)(implicit conf: NodeAppConfig)
|
||||
res <- filterSyncMarkerOpt match {
|
||||
case Some(filterSyncMarker) =>
|
||||
logger.info(
|
||||
s"Requesting next compact filter headers from=${filterSyncMarker.startHeight} to=${filterSyncMarker.stopBlockHash.flip}")
|
||||
s"Requesting next compact filter headers from $filterSyncMarker")
|
||||
sendGetCompactFilterHeadersMessage(filterSyncMarker)
|
||||
.map(_ => true)
|
||||
case None =>
|
||||
|
Loading…
Reference in New Issue
Block a user