mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat(stages): unwind on detached local head (#3066)
This commit is contained in:
@ -247,6 +247,13 @@ pub fn validate_header_regarding_parent(
|
||||
})
|
||||
}
|
||||
|
||||
if parent.hash != child.parent_hash {
|
||||
return Err(ConsensusError::ParentHashMismatch {
|
||||
expected_parent_hash: parent.hash,
|
||||
got_parent_hash: child.parent_hash,
|
||||
})
|
||||
}
|
||||
|
||||
// timestamp in past check
|
||||
if child.timestamp <= parent.timestamp {
|
||||
return Err(ConsensusError::TimestampIsInPast {
|
||||
|
||||
Reference in New Issue
Block a user