Skip to content

Fix #841 tests #865

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/main/scala/io/iohk/ethereum/extvm/VMServer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,11 @@ class VMServer(messageHandler: MessageHandler) extends Logger {

private def awaitHello(): Unit = {
val helloMsg = messageHandler.awaitMessage[msg.Hello]
require(helloMsg.version == ApiVersionProvider.version)
require(helloMsg.config.isEthereumConfig)
require(
helloMsg.version == ApiVersionProvider.version,
s"Wrong Hello message version. Expected ${ApiVersionProvider.version} but was ${helloMsg.version}"
)
require(helloMsg.config.isEthereumConfig, "Hello message ethereum config must be true")
defaultBlockchainConfig = constructBlockchainConfig(helloMsg.config.ethereumConfig.get)
}

Expand Down
2 changes: 1 addition & 1 deletion src/test/scala/io/iohk/ethereum/extvm/VMServerSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class VMServerSpec extends AnyFlatSpec with Matchers with MockFactory {
accountStartNonce = blockchainConfig.accountStartNonce
)
val ethereumConfigMsg = msg.Hello.Config.EthereumConfig(ethereumConfig)
val helloMsg = msg.Hello(version = "1.1", config = ethereumConfigMsg)
val helloMsg = msg.Hello(version = "2.0", config = ethereumConfigMsg)

val messageHandler = mock[MessageHandler]
val vmServer = new VMServer(messageHandler)
Expand Down