Search in sources :

Example 1 with Actuator

use of org.tron.core.actuator.Actuator in project java-tron by tronprotocol.

the class Manager method processTransaction.

/**
 * Process transaction.
 */
public boolean processTransaction(final TransactionCapsule trxCap) throws ValidateSignatureException, ContractValidateException, ContractExeException {
    TransactionResultCapsule transRet;
    if (trxCap == null || !trxCap.validateSignature()) {
        return false;
    }
    final List<Actuator> actuatorList = ActuatorFactory.createActuator(trxCap, this);
    TransactionResultCapsule ret = new TransactionResultCapsule();
    for (Actuator act : actuatorList) {
        act.validate();
        act.execute(ret);
        trxCap.setResult(ret);
    }
    transactionStore.put(trxCap.getTransactionId().getBytes(), trxCap);
    return true;
}
Also used : TransactionResultCapsule(org.tron.core.capsule.TransactionResultCapsule) Actuator(org.tron.core.actuator.Actuator)

Aggregations

Actuator (org.tron.core.actuator.Actuator)1 TransactionResultCapsule (org.tron.core.capsule.TransactionResultCapsule)1