Merge pull request #214 from 8aff8265aa/master
Add fix for emptyTransaction test
This commit is contained in:
commit
f3e067d28b
|
@ -89,6 +89,16 @@ public class TransactionExecutor {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Insert gas cost protection
|
||||||
|
BigInteger gasLimit = new BigInteger(1, tx.getGasLimit());
|
||||||
|
if (gasLimit.compareTo(BigInteger.ZERO) == 0) {
|
||||||
|
logger.debug("No gas limit set on transaction: hash={}",
|
||||||
|
Hex.toHexString(tx.getHash()));
|
||||||
|
|
||||||
|
receipt.setCumulativeGas(0);
|
||||||
|
this.receipt = receipt;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// FIND OUT THE TRANSACTION TYPE
|
// FIND OUT THE TRANSACTION TYPE
|
||||||
final byte[] receiverAddress;
|
final byte[] receiverAddress;
|
||||||
|
|
|
@ -110,12 +110,10 @@ public class GitHubStateTest {
|
||||||
GitHubJSONTestSuite.runGitHubJsonStateTest(json, excluded);
|
GitHubJSONTestSuite.runGitHubJsonStateTest(json, excluded);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test // todo: fix: excluded test
|
@Test // todo: fix: excluded test
|
||||||
public void stTransactionTest() throws ParseException {
|
public void stTransactionTest() throws ParseException {
|
||||||
|
|
||||||
Set<String> excluded = new HashSet<>();
|
Set<String> excluded = new HashSet<>();
|
||||||
excluded.add("EmptyTransaction");
|
|
||||||
//todo: it goes OOG, because no gasLimit is given. So it does not change the state.
|
//todo: it goes OOG, because no gasLimit is given. So it does not change the state.
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue