use of org.web3j.protocol.ipc.UnixIpcService in project besu by hyperledger.
the class Web3JSupportAcceptanceTest method netVersionCall.
@Test
public void netVersionCall() {
final String osName = System.getProperty("os.name").toLowerCase(Locale.ENGLISH);
assumeTrue(osName.contains("mac") || osName.contains("linux"));
final Web3j web3 = Web3j.build(new UnixIpcService(socketPath.toString()));
final Request<?, NetVersion> ethBlockNumberRequest = web3.netVersion();
node.verify(node -> {
try {
assertThat(ethBlockNumberRequest.send().getNetVersion()).isEqualTo(String.valueOf(2018));
} catch (IOException e) {
fail("Web3J net_version call failed", e);
}
});
}
Aggregations