From 3052f8099f515b10d5a2171ebc5b36d76805437d Mon Sep 17 00:00:00 2001 From: Noah Metz Date: Fri, 3 Nov 2023 21:53:49 -0600 Subject: [PATCH] Changed QueueTimeout to not require WaitMap --- node.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/node.go b/node.go index e009fd4..8f4b982 100644 --- a/node.go +++ b/node.go @@ -167,12 +167,12 @@ func (node *Node) ProcessResponse(wait_map WaitMap, response ResponseSignal) (Wa return WaitInfo{}, false } -// Creates a timeout signal for signal, queues it for the node at the timeout, and adds the info to the wait map -func (node *Node) QueueTimeout(dest NodeID, signal Signal, timeout time.Duration, wait_map WaitMap) { +// Creates a timeout signal for signal, queues it for the node at the timeout, and returns the WaitInfo +func (node *Node) QueueTimeout(dest NodeID, signal Signal, timeout time.Duration) WaitInfo { timeout_signal := NewTimeoutSignal(signal.ID()) node.QueueSignal(time.Now().Add(timeout), timeout_signal) - wait_map[signal.ID()] = WaitInfo{ + return WaitInfo{ NodeID: dest, Timeout: timeout_signal.Id, }