mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-10 20:36:31 +00:00
5ddfd7dd05
In RPC `eth_protocolVersion`, look at the live `EthereumNode` to find which version of `eth/NN` protocol is active, instead of trusting a compile-time constant. It's better to check dynamically. GraphQL already does this. As a result, the RPC code doesn't depend on `eth_protocol` any more. To make sure there are no more accidental users of the old constant, `protocolVersion` is no longer exported from `protocol_eth65`. (The simplest way to support `eth/65` was to make `eth_protocolVersion` use `protocol_eth65.protocolVersion`, to get 65. But that's silly. More seriously, when we add another version (`eth/66`) running alongside `eth/65`, that expression would still compile ok yet return the wrong value, while still passing the RPC test suite.) Signed-off-by: Jamie Lokier <jamie@shareable.org>