Skip to content

Commit d68ef2b

Browse files
committed
set root transaction deep to -1
1 parent 596fea5 commit d68ef2b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎src/main/java/org/tron/common/runtime/vm/program/InternalTransaction.java‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,9 @@ public InternalTransaction(Transaction trx, InternalTransaction.TrxType trxType
8282
TransactionCapsule trxCap = new TransactionCapsule(trx);
8383
this.protoEncoded = trxCap.getData();
8484
this.nonce = 0;
85-
// outside transaction should not have deep. It will not count in vm trace. But it will be shown in program result
86-
// this.deep = 0;
85+
// outside transaction should not have deep, so use -1 to mark it is root.
86+
// It will not count in vm trace. But this deep will be shown in program result.
87+
this.deep = -1;
8788
if (trxType.equals(TrxType.TRX_CONTRACT_CREATION_TYPE)) {
8889
CreateSmartContract contract = ContractCapsule.getSmartContractFromTransaction(trx);
8990
this.sendAddress = contract.getOwnerAddress().toByteArray();

0 commit comments

Comments
 (0)