use of org.tron.protos.Protocol.Transaction.Contract.ContractType.TransferContract in project java-tron by tronprotocol.
the class Manager method validateFreq.
void validateFreq(TransactionCapsule trx) throws HighFreqException {
List<org.tron.protos.Protocol.Transaction.Contract> contracts = trx.getInstance().getRawData().getContractList();
for (Transaction.Contract contract : contracts) {
if (contract.getType() == TransferContract || contract.getType() == TransferAssetContract) {
byte[] address = TransactionCapsule.getOwner(contract);
AccountCapsule accountCapsule = this.getAccountStore().get(address);
long balacne = accountCapsule.getBalance();
long latestOperationTime = accountCapsule.getLatestOperationTime();
int latstTransNumberInBlock = this.head.getTransactions().size();
doValidateFreq(balacne, latstTransNumberInBlock, latestOperationTime);
}
}
}
Aggregations