node: Turn remotes into an iterator

Signed-off-by: Alexis Sellier <self@cloudhead.io>
This commit is contained in:
Alexis Sellier
2022-09-13 10:16:05 +02:00
parent 078184b7d6
commit 7be6fe3414
8 changed files with 80 additions and 52 deletions
+2 -2
View File
@@ -95,13 +95,13 @@ impl Peer {
self.attempts = 0;
}
pub fn received<S, T, G>(
pub fn received<'r, S, T, G>(
&mut self,
envelope: Envelope,
ctx: &mut Context<S, T, G>,
) -> Result<Option<Message>, PeerError>
where
T: storage::ReadStorage + storage::WriteStorage,
T: storage::WriteStorage<'r>,
G: crypto::Signer,
{
if envelope.magic != ctx.config.network.magic() {