File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
src/main/scala/io/iohk/ethereum/blockchain/sync/regular Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -129,11 +129,11 @@ case class BlockFetcherState(
129
129
)
130
130
}
131
131
132
- private def checkConsistencyWithReadyBlocks (headers : Seq [BlockHeader ]): Boolean = {
133
- if (waitingHeaders.isEmpty) {
134
- (readyBlocks.lastOption.map(_.header), headers.headOption).mapN(_ isParentOf _).getOrElse( true )
135
- } else true
136
- }
132
+ private def checkConsistencyWithReadyBlocks (headers : Seq [BlockHeader ]): Boolean = {
133
+ (readyBlocks, headers) match {
134
+ case (_ :+ last, head +: _) if waitingHeaders.isEmpty => last.header isParentOf head
135
+ case _ => true
136
+ }
137
137
138
138
def validateNewBlockHashes (hashes : Seq [BlockHash ]): Either [String , Seq [BlockHash ]] =
139
139
hashes
You can’t perform that action at this time.
0 commit comments