Skip to content

Commit

Permalink
Move some docs to/from another PR
Browse files Browse the repository at this point in the history
  • Loading branch information
teor2345 authored May 15, 2023
1 parent 86bd654 commit 07d89b5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions zebrad/src/components/inbound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,6 @@ impl Service<zn::Request> for Inbound {
let available = transactions.into_iter().map(Available);
let missing = req_tx_ids.into_iter().filter(|tx_id| !available_tx_ids.contains(tx_id)).map(Missing);

// The network layer handles splitting this response into multiple `tx`
// messages, and a `notfound` message if needed.
zn::Response::Transactions(available.chain(missing).collect())
}).boxed()
}
Expand Down Expand Up @@ -470,6 +468,7 @@ impl Service<zn::Request> for Inbound {
block_downloads.download_and_verify(hash);
async { Ok(zn::Response::Nil) }.boxed()
}
// The size of this response is limited by the `Connection` state machine in the network layer
zn::Request::MempoolTransactionIds => {
mempool.clone().oneshot(mempool::Request::TransactionIds).map_ok(|resp| match resp {
mempool::Response::TransactionIds(transaction_ids) if transaction_ids.is_empty() => zn::Response::Nil,
Expand Down

0 comments on commit 07d89b5

Please sign in to comment.