Stop sending blocks and transactions on error

This commit is contained in:
teor 2021-02-25 21:09:36 +10:00 committed by Jane Lusby
parent bf1e2bd3b8
commit 9c3f236075
1 changed files with 2 additions and 0 deletions

View File

@ -911,6 +911,7 @@ where
for transaction in transactions.into_iter() {
if let Err(e) = self.peer_tx.send(Message::Tx(transaction)).await {
self.fail_with(e);
return;
}
}
}
@ -919,6 +920,7 @@ where
for block in blocks.into_iter() {
if let Err(e) = self.peer_tx.send(Message::Block(block)).await {
self.fail_with(e);
return;
}
}
}