This commit is contained in:
Mac L
2024-05-02 16:06:28 +10:00
parent 689cdaef61
commit d9a0c3d6c2
10 changed files with 139 additions and 157 deletions

View File

@@ -397,7 +397,7 @@ mod tests {
use std::collections::HashSet;
use store::MemoryStore;
use tokio::sync::mpsc;
use types::{ForkName, MinimalEthSpec as E};
use types::{FeatureName, ForkName, MinimalEthSpec as E};
#[derive(Debug)]
struct FakeStorage {
@@ -529,21 +529,20 @@ mod tests {
} else {
panic!("Should have sent a batch request to the peer")
};
let blob_req_id = match fork_name {
ForkName::Deneb | ForkName::Electra => {
if let Ok(NetworkMessage::SendRequest {
peer_id,
request: _,
request_id,
}) = self.network_rx.try_recv()
{
assert_eq!(&peer_id, expected_peer);
Some(request_id)
} else {
panic!("Should have sent a batch request to the peer")
}
let blob_req_id = if fork_name.has_feature(FeatureName::Deneb) {
if let Ok(NetworkMessage::SendRequest {
peer_id,
request: _,
request_id,
}) = self.network_rx.try_recv()
{
assert_eq!(&peer_id, expected_peer);
Some(request_id)
} else {
panic!("Should have sent a batch request to the peer")
}
_ => None,
} else {
None
};
(block_req_id, blob_req_id)
}