use of org.aion.precompiled.ContractInfo in project aion by aionnetwork.
the class TXValidatorTest method validateTxSignatureSwapForkEnabledReceiverAddressIsPreCompiledTest.
@Test
public void validateTxSignatureSwapForkEnabledReceiverAddressIsPreCompiledTest() {
boolean signatureSwapEnabled = true;
for (ContractInfo contractInfo : ContractInfo.values()) {
AionTransaction tx = AionTransaction.create(key, nonce, contractInfo.contractAddress, value, data, nrg, nrgPrice, type, null);
TxResponse response = TXValidator.validateTx(tx, unityForkEnabled, signatureSwapEnabled);
// Note: TOTAL CURRENCY contract has been disabled.
if (contractInfo.contractAddress.equals(ContractInfo.TOTAL_CURRENCY.contractAddress)) {
assertEquals(TxResponse.INVALID_TX_DESTINATION, response);
} else {
assertEquals(TxResponse.SUCCESS, response);
}
}
}
Aggregations