From ba10688de3e665ba679e33277fb7e4c6dbc9a683 Mon Sep 17 00:00:00 2001
From: "Richard T. Carback III" <rick.carback@gmail.com>
Date: Thu, 21 Jul 2022 19:36:50 +0000
Subject: [PATCH] Modify round processing to not attempt to access rounds when
 we are working with contact versions that are 0

---
 auth/store/receivedRequest.go | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/auth/store/receivedRequest.go b/auth/store/receivedRequest.go
index 5eaee2e8e..e41fc8f8b 100644
--- a/auth/store/receivedRequest.go
+++ b/auth/store/receivedRequest.go
@@ -1,7 +1,6 @@
 package store
 
 import (
-	"os"
 	"sync"
 
 	"github.com/cloudflare/circl/dh/sidh"
@@ -76,12 +75,12 @@ func loadReceivedRequest(kv *versioned.KV, partner *id.ID) (
 			partner)
 	}
 
-	round, err := rounds.LoadRound(kv, makeRoundKey(partner))
-	if err != nil {
-		if contactVersion == 0 && os.IsNotExist(err) {
-			jww.WARN.Printf("Old contact version, round to nil")
-			round = rounds.Round{}
-		} else {
+	round := rounds.Round{}
+	if contactVersion == 0 {
+		jww.WARN.Printf("Old contact version, round to nil")
+	} else {
+		round, err = rounds.LoadRound(kv, makeRoundKey(partner))
+		if err != nil {
 			return nil, errors.WithMessagef(err, "Failed to Load "+
 				"round request was received on with %s",
 				partner)
-- 
GitLab