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 <jamie@shareable.org>
This commit is contained in:
Jamie Lokier 2021-07-23 18:02:56 +01:00
parent 00647b373c
commit b3cf42ed28
No known key found for this signature in database
GPG Key ID: CBC25C68435C30A2
1 changed files with 6 additions and 1 deletions

View File

@ -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()