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,14 +1419,16 @@ impl Bank {
|
||||
);
|
||||
|
||||
let post_balance = self.deposit(&self.collector_id, unburned);
|
||||
self.rewards.write().unwrap().push((
|
||||
self.collector_id,
|
||||
RewardInfo {
|
||||
reward_type: RewardType::Fee,
|
||||
lamports: unburned as i64,
|
||||
post_balance,
|
||||
},
|
||||
));
|
||||
if unburned != 0 {
|
||||
self.rewards.write().unwrap().push((
|
||||
self.collector_id,
|
||||
RewardInfo {
|
||||
reward_type: RewardType::Fee,
|
||||
lamports: unburned as i64,
|
||||
post_balance,
|
||||
},
|
||||
));
|
||||
}
|
||||
self.capitalization.fetch_sub(burned, Relaxed);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user