Fix ChainScoreTest.setRevision
cannot set a value greater than LastRevision
@@ -186,18 +186,21 @@ public class ChainScoreTest{
LOG.infoEntering("setRevision");
BigInteger oldRevision = Utils.icxCall(iconService,
Constants.CHAINSCORE_ADDRESS, "getRevision", null).asInteger();
- BigInteger newRevision = oldRevision.add(BigInteger.valueOf(100));
- RpcObject params = new RpcObject.Builder()
- .put("code", new RpcValue(newRevision))
- .build();
- LOG.infoEntering("method[setRevision] OLD[" + oldRevision + "], NEW[" + newRevision + "]");
- sendGovCallTx(score.addr, "setRevision", params);
- LOG.infoExiting();
+ // TODO add test with greater revision
+// BigInteger newRevision = oldRevision.add(BigInteger.valueOf(1));
+// RpcObject params = new RpcObject.Builder()
+// .put("code", new RpcValue(newRevision))
+// .build();
+// LOG.infoEntering("method[setRevision] OLD[" + oldRevision + "], NEW[" + newRevision + "]");
+// sendGovCallTx(score.addr, "setRevision", params);
+// LOG.infoExiting();
+ BigInteger newRevision;
+ RpcObject params;
BigInteger revision = Utils.icxCall(iconService,
Constants.CHAINSCORE_ADDRESS, "getRevision", null).asInteger();
if(score.addr.equals(Constants.GOV_ADDRESS)) {
- assertEquals(newRevision, revision);
+// assertEquals(newRevision, revision);
for (int i = 0; i < 2; i++) {
// It allows to set a greater value than the current. test with same value & less value.
BigInteger wrongRevision = revision.subtract(BigInteger.valueOf(i));
