Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

uses named fields for RentResullt::CollectRent enum variant #26449

Merged

Conversation

behzadnouri
Copy link
Contributor

Problem

Raw tuple CollectRent((Epoch, u64)) is ambiguous.

Summary of Changes

Use named fields:

CollectRent {
    new_rent_epoch: Epoch,
    rent_due: u64,
},

Copy link
Contributor

@jeffwashington jeffwashington left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@behzadnouri behzadnouri merged commit d7201a8 into solana-labs:master Jul 6, 2022
@behzadnouri behzadnouri deleted the rent-result-collect-rent branch July 6, 2022 20:01
mergify bot pushed a commit that referenced this pull request Jul 10, 2022
Avoiding ambiguous raw tuple:
    CollectRent((Epoch, u64))

Using named fields instead:
    CollectRent {
        new_rent_epoch: Epoch,
        rent_due: u64,
    },

(cherry picked from commit d7201a8)

# Conflicts:
#	runtime/src/bank.rs
#	runtime/src/expected_rent_collection.rs
#	runtime/src/rent_collector.rs
mergify bot added a commit that referenced this pull request Jul 10, 2022
* names fields in RentResullt::CollectRent enum variant (#26449)

Avoiding ambiguous raw tuple:
    CollectRent((Epoch, u64))

Using named fields instead:
    CollectRent {
        new_rent_epoch: Epoch,
        rent_due: u64,
    },

(cherry picked from commit d7201a8)

# Conflicts:
#	runtime/src/bank.rs
#	runtime/src/expected_rent_collection.rs
#	runtime/src/rent_collector.rs

* removes mergify merge conflicts

* preserves rent_epoch for rent exempt accounts (#26479)

#22292
prevents rent paying account creation going forward. As a result
rent_epoch field for rent exempt accounts is redundant, and advancing
this field will incur expensive account rewrites and cause discrepancy
between accounts-db and cached vote/stake accounts.

This commit adds a feature which upon activation preserves rent_epoch
field for rent exempt accounts so that the field is frozen and is no
longer advanced.

(cherry picked from commit c99d9f0)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants