From e4cade4ea71b5e92ec317e40ee5949731e5b209d Mon Sep 17 00:00:00 2001
From: ledgerwatch <akhounov@gmail.com>
Date: Wed, 21 Jul 2021 22:37:32 +0100
Subject: [PATCH] Fix recording file for rpctest (#2418)

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
---
 cmd/rpctest/rpctest/utils.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmd/rpctest/rpctest/utils.go b/cmd/rpctest/rpctest/utils.go
index 4f1b6e653d..1a950b8b1d 100644
--- a/cmd/rpctest/rpctest/utils.go
+++ b/cmd/rpctest/rpctest/utils.go
@@ -202,8 +202,8 @@ func requestAndCompare(request string, methodName string, errCtx string, reqGen
 			return fmt.Errorf("error invoking %s (Geth/OE): %d %s\n", methodName, errVal.GetInt("code"), errVal.GetStringBytes("message"))
 		}
 		if resg.Err == nil && resg.Result.Get("error") == nil {
-			recording = false
 			if err := compareResults(res.Result, resg.Result); err != nil {
+				recording = false
 				if errs != nil {
 					fmt.Printf("different results for method %s, errCtx: %s: %v\n", methodName, errCtx, err)
 					fmt.Fprintf(errs, "\nDifferent results for method %s, errCtx %s: %v\n", methodName, errCtx, err)
-- 
GitLab