Don't report RewardType::Fee when none was awarded (#12876)
(cherry picked from commit 4b04ed86b6
)
Co-authored-by: Michael Vines <mvines@gmail.com>
This commit is contained in:
@ -1419,6 +1419,7 @@ impl Bank {
|
|||||||
);
|
);
|
||||||
|
|
||||||
let post_balance = self.deposit(&self.collector_id, unburned);
|
let post_balance = self.deposit(&self.collector_id, unburned);
|
||||||
|
if unburned != 0 {
|
||||||
self.rewards.write().unwrap().push((
|
self.rewards.write().unwrap().push((
|
||||||
self.collector_id,
|
self.collector_id,
|
||||||
RewardInfo {
|
RewardInfo {
|
||||||
@ -1427,6 +1428,7 @@ impl Bank {
|
|||||||
post_balance,
|
post_balance,
|
||||||
},
|
},
|
||||||
));
|
));
|
||||||
|
}
|
||||||
self.capitalization.fetch_sub(burned, Relaxed);
|
self.capitalization.fetch_sub(burned, Relaxed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user