File tree 1 file changed +1
-10
lines changed
1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -153,9 +153,6 @@ impl Inner {
153
153
// and we don't want to hold the lock for too long.
154
154
let allocations: Vec < _ > = self . allocations . lock ( ) . unwrap ( ) . values ( ) . cloned ( ) . collect ( ) ;
155
155
156
- // Get the fees for each allocation in parallel. This is required because the
157
- // SenderAllocation's fees is behind a Mutex.
158
-
159
156
let mut heaviest_allocation = ( None , 0u128 ) ;
160
157
for allocation in allocations {
161
158
let allocation: Arc < SenderAllocation > = match allocation {
@@ -182,6 +179,7 @@ impl Inner {
182
179
// Similar pattern to get_heaviest_allocation().
183
180
let allocations: Vec < _ > = self . allocations . lock ( ) . unwrap ( ) . values ( ) . cloned ( ) . collect ( ) ;
184
181
182
+ // Gather the unaggregated fees from all allocations and sum them up.
185
183
let mut unaggregated_fees = self . unaggregated_fees . lock ( ) . unwrap ( ) ;
186
184
* unaggregated_fees = UnaggregatedReceipts :: default ( ) ; // Reset to 0.
187
185
for allocation in allocations {
@@ -197,13 +195,6 @@ impl Inner {
197
195
} ;
198
196
}
199
197
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
-
207
198
Ok ( ( ) )
208
199
}
209
200
You can’t perform that action at this time.
0 commit comments