diff --git a/data/transactions/logic/eval.go b/data/transactions/logic/eval.go index 139c5174a4..e6db3e61e6 100644 --- a/data/transactions/logic/eval.go +++ b/data/transactions/logic/eval.go @@ -2239,8 +2239,7 @@ func (cx *EvalContext) getTxID(txn *transactions.Transaction, groupIndex int, in if inner { // Initialize innerTxidCache if necessary if cx.EvalParams.innerTxidCache == nil { - lastGroupLen := len(cx.getLastInnerGroup()) - cx.EvalParams.innerTxidCache = make(map[int]transactions.Txid, lastGroupLen) + cx.EvalParams.innerTxidCache = make(map[int]transactions.Txid) } txid, ok := cx.EvalParams.innerTxidCache[groupIndex] @@ -2262,7 +2261,6 @@ func (cx *EvalContext) getTxID(txn *transactions.Transaction, groupIndex int, in cx.EvalParams.txidCache = make(map[int]transactions.Txid, len(cx.TxnGroup)) } - // Hashes are expensive, so we cache computed TxIDs txid, ok := cx.EvalParams.txidCache[groupIndex] if !ok { if cx.caller != nil { diff --git a/data/transactions/logic/evalAppTxn_test.go b/data/transactions/logic/evalAppTxn_test.go index 8141bc7387..8472f47ebc 100644 --- a/data/transactions/logic/evalAppTxn_test.go +++ b/data/transactions/logic/evalAppTxn_test.go @@ -1423,6 +1423,7 @@ itxn Logs 0 // reported with `global GroupID` are correct for top-level and inner transactions func TestTxIDAndGroupIDCalculation(t *testing.T) { partitiontest.PartitionTest(t) + t.Parallel() withoutGroupID := func(txn transactions.Transaction) transactions.Transaction { txn.Group = crypto.Digest{} @@ -1835,6 +1836,7 @@ int 1 // correct for inner transactions func TestInnerTxIDCalculation(t *testing.T) { partitiontest.PartitionTest(t) + t.Parallel() type actualInfo struct { txn transactions.Transaction @@ -2140,6 +2142,7 @@ int 1 func TestInnerTxIDCaching(t *testing.T) { partitiontest.PartitionTest(t) + t.Parallel() parentAppID := basics.AppIndex(888) childAppID := basics.AppIndex(222)