Revert "Revert "renames, remove , wrap BlockWrapper enum to make descontruction private""

This reverts commit 1931a442dc.
This commit is contained in:
realbigsean
2022-12-28 10:31:18 -05:00
parent 1931a442dc
commit 8a70d80a2f
19 changed files with 231 additions and 268 deletions

View File

@@ -373,7 +373,7 @@ where
#[cfg(test)]
mod tests {
use crate::service::RequestId;
use crate::sync::range_sync::ExpectedBatchTy;
use crate::sync::range_sync::ByRangeRequestType;
use crate::NetworkMessage;
use super::*;
@@ -686,7 +686,7 @@ mod tests {
let (peer1, local_info, head_info) = rig.head_peer();
range.add_peer(&mut rig.cx, local_info, peer1, head_info);
let ((chain1, batch1), id1) = match rig.grab_request(&peer1).0 {
RequestId::Sync(crate::sync::manager::RequestId::RangeSync { id }) => {
RequestId::Sync(crate::sync::manager::RequestId::RangeBlocks { id }) => {
(rig.cx.range_sync_response(id, true).unwrap(), id)
}
other => panic!("unexpected request {:?}", other),
@@ -705,7 +705,7 @@ mod tests {
let (peer2, local_info, finalized_info) = rig.finalized_peer();
range.add_peer(&mut rig.cx, local_info, peer2, finalized_info);
let ((chain2, batch2), id2) = match rig.grab_request(&peer2).0 {
RequestId::Sync(crate::sync::manager::RequestId::RangeSync { id }) => {
RequestId::Sync(crate::sync::manager::RequestId::RangeBlocks { id }) => {
(rig.cx.range_sync_response(id, true).unwrap(), id)
}
other => panic!("unexpected request {:?}", other),