From 191f65e2648147862af2c69c320d123691eff6d3 Mon Sep 17 00:00:00 2001 From: Ryan Schneider Date: Thu, 27 Jun 2024 10:20:34 -0700 Subject: [PATCH] fixup: error if either JSONRPC id or jsonrpc field is missing Co-authored-by: Chris Hager --- flashbotsrpc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flashbotsrpc.go b/flashbotsrpc.go index e96adb6..45e00bf 100644 --- a/flashbotsrpc.go +++ b/flashbotsrpc.go @@ -211,7 +211,7 @@ func (rpc *FlashbotsRPC) CallWithFlashbotsSignature(method string, privKey *ecds return nil, err } - if resp.ID != request.ID && resp.JSONRPC != request.JSONRPC { + if resp.ID != request.ID || resp.JSONRPC != request.JSONRPC { // this means we got back JSON but not a valid JSONRPC response return nil, fmt.Errorf("%w: invalid JSONRPC response (HTTP status code: %d)", ErrRelayErrorResponse, response.StatusCode) }