Skip to content

Commit

Permalink
Merge branch 'master' into UlyanaAndrukhiv/6068-registerDB-pruning-mo…
Browse files Browse the repository at this point in the history
…dule
  • Loading branch information
Guitarheroua authored Nov 12, 2024
2 parents b2574ab + acbc34f commit fdae17c
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions module/metrics/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,6 @@ func (tc *TransactionCollector) TransactionFinalized(txID flow.Identifier, when

tc.trackTTF(t, tc.logTimeToFinalized)
tc.trackTTFE(t, tc.logTimeToFinalizedExecuted)

// remove transaction timing from mempool if finalized and executed
if !t.Finalized.IsZero() && !t.Executed.IsZero() {
tc.transactionTimings.Remove(txID)
}
}

func (tc *TransactionCollector) TransactionExecuted(txID flow.Identifier, when time.Time) {
Expand All @@ -280,11 +275,6 @@ func (tc *TransactionCollector) TransactionExecuted(txID flow.Identifier, when t

tc.trackTTE(t, tc.logTimeToExecuted)
tc.trackTTFE(t, tc.logTimeToFinalizedExecuted)

// remove transaction timing from mempool if finalized and executed
if !t.Finalized.IsZero() && !t.Executed.IsZero() {
tc.transactionTimings.Remove(txID)
}
}

func (tc *TransactionCollector) TransactionSealed(txID flow.Identifier, when time.Time) {
Expand All @@ -302,10 +292,8 @@ func (tc *TransactionCollector) TransactionSealed(txID flow.Identifier, when tim

tc.trackTTS(t, tc.logTimeToSealed)

// remove transaction timing from mempool if sealed
if !t.Sealed.IsZero() {
tc.transactionTimings.Remove(txID)
}
// remove transaction timing from mempool
tc.transactionTimings.Remove(txID)
}

func (tc *TransactionCollector) trackTTF(t *flow.TransactionTiming, log bool) {
Expand Down

0 comments on commit fdae17c

Please sign in to comment.