Deinitialize nonce data upon zero balance

This commit is contained in:
Trent Nelson
2020-12-21 15:44:00 -07:00
committed by Trent Nelson
parent ace360ade2
commit 3881ae10fb
2 changed files with 12 additions and 0 deletions

View File

@ -236,6 +236,8 @@ impl Accounts {
})? {
SystemAccountKind::System => 0,
SystemAccountKind::Nonce => {
// Should we ever allow a fees charge to zero a nonce account's
// balance. The state MUST be set to uninitialized in that case
rent_collector.rent.minimum_balance(nonce::State::size())
}
};