From b3cf42ed28d5ed756a8355e06708a706da773d6b Mon Sep 17 00:00:00 2001 From: Jamie Lokier Date: Fri, 23 Jul 2021 18:02:56 +0100 Subject: [PATCH] RPC: Update `eth_protocolVersion` expected result to hard-coded 65 Use a hard-coded number instead of the same expression as the client, so that bugs introduced via that expression are detected. Using the same expression as the client can hide issues when the value is wrong in both places. When the expected value genuinely changes, it'll be obvious. Just change this number. Signed-off-by: Jamie Lokier --- tests/test_rpc.nim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_rpc.nim b/tests/test_rpc.nim index 2f610ef70..f054d0ef3 100644 --- a/tests/test_rpc.nim +++ b/tests/test_rpc.nim @@ -193,7 +193,12 @@ proc rpcMain*() = test "eth_protocolVersion": let res = await client.eth_protocolVersion() - check res == $protocol_eth65.protocolVersion + # Use a hard-coded number instead of the same expression as the client, + # so that bugs introduced via that expression are detected. Using the + # same expression as the client can hide issues when the value is wrong + # in both places. When the expected value genuinely changes, it'll be + # obvious. Just change this number. + check res == "65" test "eth_syncing": let res = await client.eth_syncing()