Skip to content

Commit

Permalink
Merge pull request #2134 from rsksmart/update_protocol_version_response
Browse files Browse the repository at this point in the history
Convert rsk_protocalVersion return value to hex
  • Loading branch information
Vovchyk authored Sep 27, 2023
2 parents b05236e + 8cebafd commit e06686f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rskj-core/src/main/java/org/ethereum/rpc/Web3Impl.java
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ public String rsk_protocolVersion() {
}
}

return s = Integer.toString(version);
return s = HexUtils.toQuantityJsonHex(version);
} finally {
if (logger.isDebugEnabled()) {
logger.debug("rsk_protocolVersion(): {}", s);
Expand Down
2 changes: 1 addition & 1 deletion rskj-core/src/test/java/org/ethereum/rpc/Web3ImplTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ void eth_protocolVersion() {

String netVersion = web3.eth_protocolVersion();

assertEquals(0, netVersion.compareTo("1"), "RSK net version different than one");
assertEquals(0, netVersion.compareTo("0x1"), "RSK net version different than one");
}

@Test
Expand Down

0 comments on commit e06686f

Please sign in to comment.