Don't report RewardType::Fee when none was awarded

This commit is contained in:
Michael Vines 2020-10-13 14:03:41 -07:00
parent d6ed5d220a
commit 4b04ed86b6
1 changed files with 10 additions and 8 deletions

View File

@ -1484,6 +1484,7 @@ impl Bank {
);
let post_balance = self.deposit(&self.collector_id, unburned);
if unburned != 0 {
self.rewards.write().unwrap().push((
self.collector_id,
RewardInfo {
@ -1492,6 +1493,7 @@ impl Bank {
post_balance,
},
));
}
self.capitalization.fetch_sub(burned, Relaxed);
}
}