Skip to content

Commit

Permalink
Merge pull request #66 from mwcproject/feature/archive_nodes_sync
Browse files Browse the repository at this point in the history
Archive node for short body sync can use any peer, not just archive. …
  • Loading branch information
bayk authored Jul 17, 2024
2 parents 92175a2 + 0f9b21e commit bf19c5b
Showing 1 changed file with 2 additions and 1 deletion.
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

0 comments on commit bf19c5b

Please sign in to comment.