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
}
return source
.distinctUntilChanged {
it.hash
.filter {
log.debug("Filtering block $upstreamId block $it")
forkChoice.filter(it)
}
.filter { forkChoice.filter(it) }
.doFinally {
// close internal stream if upstream is finished, otherwise it gets stuck,
// but technically it should never happen during normal work, only when the Head