} catch (RuntimeException e) {
trackRepository.rollback();
return new BigInteger(1, tx.getGasLimit()).longValue();
}
trackRepository.commit();
} else {
// REFUND GASDEBIT EXCEPT FOR FEE (500 + 5*TXDATA)
long dataCost = tx.getData() == null ? 0: tx.getData().length * GasCost.TXDATA;
gasUsed = GasCost.TRANSACTION + dataCost;