75
75
import static org .junit .jupiter .api .Assertions .assertTrue ;
76
76
77
77
/** JSON-RPC 2.0 Integration Tests. */
78
- @ EVMTest (type = NodeType .GETH )
78
+ @ EVMTest (type = NodeType .BESU )
79
79
public class CoreIT {
80
80
81
81
private static Web3j web3j ;
@@ -154,7 +154,7 @@ public void testEthMining() throws Exception {
154
154
@ Test
155
155
public void testEthHashrate () throws Exception {
156
156
EthHashrate ethHashrate = web3j .ethHashrate ().send ();
157
- assertEquals (ethHashrate .getHashrate (), (BigInteger .ZERO ));
157
+ assertEquals (1 , ethHashrate .getHashrate (). compareTo (BigInteger .ONE ));
158
158
}
159
159
160
160
@ Test
@@ -253,6 +253,7 @@ public void testEthSign() throws Exception {
253
253
}
254
254
255
255
@ Test
256
+ @ Disabled ("Enable in the next release when geth is fixed" )
256
257
public void testEthSendTransaction (Web3j web3j , ContractGasProvider gasProvider )
257
258
throws Exception {
258
259
EthSendTransaction ethSendTransaction =
@@ -285,20 +286,22 @@ public void testEthSendRawTransaction() throws Exception {
285
286
}
286
287
287
288
@ Test
289
+ @ Disabled ("This should be enabled in the next release when geth is fixed" )
288
290
public void testEthCall (Web3j web3j , ContractGasProvider gasProvider ) throws Exception {
291
+
289
292
EthCall ethCall =
290
293
web3j .ethCall (
291
294
config .buildTransaction (web3j , gasProvider ),
292
- DefaultBlockParameter . valueOf ( "latest" ) )
295
+ DefaultBlockParameterName . LATEST )
293
296
.send ();
294
297
295
- assertEquals (DefaultBlockParameterName .LATEST .getValue (), ("latest" ));
296
298
assertEquals (
297
299
"0x60806040526004361061004b5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633c7fdc70811461005057806361047ff41461007a575b600080fd5b34801561005c57600080fd5b50610068600435610092565b60408051918252519081900360200190f35b34801561008657600080fd5b506100686004356100e0565b600061009d826100e0565b604080518481526020810183905281519293507f71e71a8458267085d5ab16980fd5f114d2d37f232479c245d523ce8d23ca40ed929081900390910190a1919050565b60008115156100f15750600061011e565b81600114156101025750600161011e565b61010e600283036100e0565b61011a600184036100e0565b0190505b9190505600a165627a7a723058201b9d0941154b95636fb5e4225fefd5c2c460060efa5f5e40c9826dce08814af80029" ,
298
300
ethCall .getValue ());
299
301
}
300
302
301
303
@ Test
304
+ @ Disabled ("Enable in the next release when geth is fixed" )
302
305
public void testEthEstimateGas (Web3j web3j , ContractGasProvider gasProvider ) throws Exception {
303
306
org .web3j .protocol .core .methods .request .Transaction transaction =
304
307
org .web3j .protocol .core .methods .request .Transaction .createContractTransaction (
@@ -307,7 +310,7 @@ public void testEthEstimateGas(Web3j web3j, ContractGasProvider gasProvider) thr
307
310
gasProvider .getGasPrice (),
308
311
config .validContractCode ());
309
312
EthEstimateGas ethEstimateGas = web3j .ethEstimateGas (transaction ).send ();
310
- assertTrue (ethEstimateGas .getAmountUsed ().signum () == 1 );
313
+ assertEquals (ethEstimateGas .getAmountUsed ().signum (), 1 );
311
314
}
312
315
313
316
@ Test
0 commit comments