Skip to content

Commit

Permalink
Adds expiration iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
SirTyson committed Jun 13, 2023
1 parent 72c85fd commit 7a4cfa1
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion Stellar-contract-config-setting.x
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,25 @@ struct StateExpirationSettings {
int64 restorableRentRateDenominator;
int64 tempRentRateDenominator;

// max number of entries that emit expiration meta in a single ledger
uint32 maxEntriesToExpire;

// maximum bytes to scan the BucketList for expired entries in a single ledger, in megabytes
uint32 maxBytesToScan;

union switch (int v)
{
case 0:
void;
} ext;
};

// Points to BucketEntry in BucketList where expiration scan last stopped
struct ExpirationIterator {
uint32 bucketListLevel;
bool isCurrBucket;
uint64 bucketFileOffset;

union switch (int v)
{
case 0:
Expand All @@ -179,7 +198,8 @@ enum ConfigSettingID
CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8,
CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9,
CONFIG_SETTING_STATE_EXPIRATION = 10,
CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11
CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11,
CONFIG_SETTING_EXPIRATION_ITERATOR = 12
};

union ConfigSettingEntry switch (ConfigSettingID configSettingID)
Expand Down Expand Up @@ -208,5 +228,7 @@ case CONFIG_SETTING_STATE_EXPIRATION:
StateExpirationSettings stateExpirationSettings;
case CONFIG_SETTING_CONTRACT_EXECUTION_LANES:
ConfigSettingContractExecutionLanesV0 contractExecutionLanes;
case CONFIG_SETTING_EXPIRATION_ITERATOR:
ExpirationIterator expirationIterator;
};
}

0 comments on commit 7a4cfa1

Please sign in to comment.