From ed0b88c990c35d3e613cbb394ebe60a6196e3fa2 Mon Sep 17 00:00:00 2001 From: gmega Date: Tue, 29 Aug 2023 17:32:40 -0300 Subject: [PATCH] change lifecycle event handler name --- swarmsim/engine/peer.nim | 2 +- swarmsim/engine/protocol.nim | 2 +- tests/helpers/inbox.nim | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/swarmsim/engine/peer.nim b/swarmsim/engine/peer.nim index d47acb5..0721d20 100644 --- a/swarmsim/engine/peer.nim +++ b/swarmsim/engine/peer.nim @@ -41,7 +41,7 @@ method atScheduledTime*(self: PeerLifecycleChange, # ... but self-transitions do not get reported downstream. if oldState != newState: self.peer.protocols.values.toSeq.apply(p => - p.onLifecycleEventType(self.peer, self.event, self.network)) + p.onPeerLifecycleChange(self.peer, self.event, self.network)) proc getProtocol*(self: Peer, id: string): Option[Protocol] = if self.protocols.hasKey(id): diff --git a/swarmsim/engine/protocol.nim b/swarmsim/engine/protocol.nim index 8672c41..62c166a 100644 --- a/swarmsim/engine/protocol.nim +++ b/swarmsim/engine/protocol.nim @@ -15,7 +15,7 @@ method deliver*( ): void {.base.} = raise newException(CatchableError, "Method without implementation override") -method onLifecycleEventType*( +method onPeerLifecycleChange*( self: Protocol, peer: Peer, event: LifecycleEventType, diff --git a/tests/helpers/inbox.nim b/tests/helpers/inbox.nim index deefcbc..e7a4ba8 100644 --- a/tests/helpers/inbox.nim +++ b/tests/helpers/inbox.nim @@ -25,7 +25,7 @@ method deliver*( method `protocolId`*(self: Inbox): string = self.protocolId -method onLifecycleEventType*( +method onPeerLifecycleChange*( self: Inbox, peer: Peer, event: LifecycleEventType,