Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
714 changes: 191 additions & 523 deletions src/chain/chain.rs

Large diffs are not rendered by default.

8 changes: 0 additions & 8 deletions src/chain/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ pub(crate) enum HeaderSyncError {
HeadersNotConnected,
InvalidHeaderWork,
InvalidHeaderTimes,
PreCheckpointFork,
InvalidCheckpoint,
MiscalculatedDifficulty,
InvalidBits,
FloatingHeaders,
LessWorkFork,
DbError,
}

Expand All @@ -30,9 +28,6 @@ impl Display for HeaderSyncError {
HeaderSyncError::InvalidHeaderTimes => {
write!(f, "one or more headers does not have a valid block time.")
}
HeaderSyncError::PreCheckpointFork => {
write!(f, "the sync peer sent us a discontinuous chain.")
}
HeaderSyncError::InvalidCheckpoint => {
write!(f, "a checkpoint in the chain did not match.")
}
Expand All @@ -43,9 +38,6 @@ impl Display for HeaderSyncError {
f,
"the peer sent us a chain that does not connect to any header of ours."
),
HeaderSyncError::LessWorkFork => {
write!(f, "a peer sent us a fork with less work than our chain.")
}
HeaderSyncError::DbError => write!(f, "the database could not load a fork."),
HeaderSyncError::InvalidBits => write!(
f,
Expand Down
Loading