mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-22 13:40:16 +01:00
Make ProcessNextHeaders use the headers argument as in/out
This allows reusing the same vector storage for input and output headers to HeadersSync::ProcessNextHeaders. It's also natural in the sense that this argument just represents the headers-to-be-processed, both in the caller and the callee, and both before and after the calls.
This commit is contained in:
@@ -2514,12 +2514,6 @@ bool PeerManagerImpl::IsContinuationOfLowWorkHeadersSync(Peer& peer, CNode& pfro
|
||||
}
|
||||
}
|
||||
|
||||
if (result.success) {
|
||||
// We only overwrite the headers passed in if processing was
|
||||
// successful.
|
||||
headers.swap(result.pow_validated_headers);
|
||||
}
|
||||
|
||||
return result.success;
|
||||
}
|
||||
// Either we didn't have a sync in progress, or something went wrong
|
||||
|
||||
Reference in New Issue
Block a user