Skip to content

Commit

Permalink
fixup: error if either JSONRPC id or jsonrpc field is missing
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Hager <[email protected]>
  • Loading branch information
ryanschneider and metachris authored Jun 27, 2024
1 parent 656872b commit 191f65e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flashbotsrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 191f65e

Please sign in to comment.