diff --git a/modules/host/storageobligations.go b/modules/host/storageobligations.go index e301f3a5e5..1c1c3e6f55 100644 --- a/modules/host/storageobligations.go +++ b/modules/host/storageobligations.go @@ -596,6 +596,9 @@ func (h *Host) removeStorageObligation(so storageObligation, sos storageObligati h.financialMetrics.StorageRevenue = h.financialMetrics.StorageRevenue.Add(so.PotentialStorageRevenue) h.financialMetrics.DownloadBandwidthRevenue = h.financialMetrics.DownloadBandwidthRevenue.Add(so.PotentialDownloadRevenue) h.financialMetrics.UploadBandwidthRevenue = h.financialMetrics.UploadBandwidthRevenue.Add(so.PotentialUploadRevenue) + + // Add spend transaction fees + h.financialMetrics.TransactionFeeExpenses = h.financialMetrics.TransactionFeeExpenses.Add(so.TransactionFeesAdded) } if sos == obligationFailed { // Remove the obligation statistics as potential risk and income. @@ -610,6 +613,9 @@ func (h *Host) removeStorageObligation(so storageObligation, sos storageObligati // Add the obligation statistics as loss. h.financialMetrics.LostStorageCollateral = h.financialMetrics.LostStorageCollateral.Add(so.RiskedCollateral) h.financialMetrics.LostRevenue = h.financialMetrics.LostRevenue.Add(so.ContractCost).Add(so.PotentialStorageRevenue).Add(so.PotentialDownloadRevenue).Add(so.PotentialUploadRevenue) + + // Add spend transaction fees + h.financialMetrics.TransactionFeeExpenses = h.financialMetrics.TransactionFeeExpenses.Add(so.TransactionFeesAdded) } // Update the storage obligation to be finalized but still in-database. The