mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-27 20:45:48 +00:00
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:
parent
00647b373c
commit
b3cf42ed28
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user