Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Archive node for short body sync can use any peer, not just archive. … #66

Merged
merged 1 commit into from
Jul 17, 2024
Merged
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
3 changes: 2 additions & 1 deletion servers/src/grin/sync/body_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ impl BodySync {
let head = self.chain.head()?;
let header_head = self.chain.header_head()?;
let fork_point = self.chain.fork_point()?;
let archive_header = self.chain.txhashset_archive_header_header_only().unwrap();

if self.chain.check_txhashset_needed(&fork_point)? {
trace!(
Expand All @@ -96,7 +97,7 @@ impl BodySync {
let peers_iter = || {
// If we are running with archive mode enabled we only want to sync
// from other archive nodes.
let cap = if self.archive_mode() {
let cap = if self.archive_mode() && head.height <= archive_header.height {
Capabilities::BLOCK_HIST
} else {
Capabilities::UNKNOWN
Expand Down
Loading