MCPcopy Create free account
hub / github.com/consensus-shipyard/ipc / assert_request

Function assert_request

ext/libp2p-bitswap/src/query.rs:531–538  ·  view source on GitHub ↗
(event: Option<QueryEvent>, req: Request)

Source from the content-addressed store, hash-verified

529 }
530
531 fn assert_request(event: Option<QueryEvent>, req: Request) -> QueryId {
532 if let Some(QueryEvent::Request(id, req2)) = event {
533 assert_eq!(req2, req);
534 id
535 } else {
536 panic!("{:?} is not a request", event);
537 }
538 }
539
540 fn assert_complete(event: Option<QueryEvent>, id: QueryId, res: Result<(), Cid>) {
541 if let Some(QueryEvent::Complete(id2, res2)) = event {

Calls

no outgoing calls