fix priority forkchoice, in case some nodes are faster than others

This commit is contained in:
Termina1
2022-12-03 15:54:05 +02:00
parent afa3745478
commit 5e15096da5

View File

@@ -73,10 +73,10 @@ abstract class AbstractHead @JvmOverloads constructor(
completed = false completed = false
} }
return source return source
.distinctUntilChanged { .filter {
it.hash log.debug("Filtering block $upstreamId block $it")
forkChoice.filter(it)
} }
.filter { forkChoice.filter(it) }
.doFinally { .doFinally {
// close internal stream if upstream is finished, otherwise it gets stuck, // close internal stream if upstream is finished, otherwise it gets stuck,
// but technically it should never happen during normal work, only when the Head // but technically it should never happen during normal work, only when the Head