Skip to content

Commit 6f1ec7c

Browse files
committed
chore: fix comments
Signed-off-by: Alexis Asseman <[email protected]>
1 parent 6a30136 commit 6f1ec7c

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

tap-agent/src/tap/sender_account.rs

+1-10
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,6 @@ impl Inner {
153153
// and we don't want to hold the lock for too long.
154154
let allocations: Vec<_> = self.allocations.lock().unwrap().values().cloned().collect();
155155

156-
// Get the fees for each allocation in parallel. This is required because the
157-
// SenderAllocation's fees is behind a Mutex.
158-
159156
let mut heaviest_allocation = (None, 0u128);
160157
for allocation in allocations {
161158
let allocation: Arc<SenderAllocation> = match allocation {
@@ -182,6 +179,7 @@ impl Inner {
182179
// Similar pattern to get_heaviest_allocation().
183180
let allocations: Vec<_> = self.allocations.lock().unwrap().values().cloned().collect();
184181

182+
// Gather the unaggregated fees from all allocations and sum them up.
185183
let mut unaggregated_fees = self.unaggregated_fees.lock().unwrap();
186184
*unaggregated_fees = UnaggregatedReceipts::default(); // Reset to 0.
187185
for allocation in allocations {
@@ -197,13 +195,6 @@ impl Inner {
197195
};
198196
}
199197

200-
// Added benefit to this lock is that it pauses the handle_new_receipt_notification() calls
201-
// while we're recomputing the unaggregated fees value. Hopefully this is a very short
202-
// pause overall.
203-
204-
// Recompute the sender's total unaggregated fees value and last receipt ID, because new
205-
// receipts might have been added to the DB in the meantime.
206-
207198
Ok(())
208199
}
209200

0 commit comments

Comments
 (0)