Skip to content

Commit 062b006

Browse files
committed
Fix precompiles build with solana-rent 3.x
Use DEFAULT_LAMPORTS_PER_BYTE_YEAR when initializing the rent sysvar for the precompiles feature. litesvm declares solana-rent = "3.0", and DEFAULT_LAMPORTS_PER_BYTE_YEAR exists across the supported 3.x range, while DEFAULT_LAMPORTS_PER_BYTE is not available in solana-rent 3.0.0.
1 parent ab5f905 commit 062b006

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

crates/litesvm/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,8 @@ impl LiteSVM {
555555
.is_active(&agave_feature_set::deprecate_rent_exemption_threshold::id())
556556
{
557557
rent_account.exemption_threshold = 1.0;
558-
rent_account.lamports_per_byte_year = solana_rent::DEFAULT_LAMPORTS_PER_BYTE
558+
rent_account.lamports_per_byte_year =
559+
solana_rent::DEFAULT_LAMPORTS_PER_BYTE_YEAR
559560
}
560561
self.set_sysvar(&rent_account);
561562
}

0 commit comments

Comments
 (0)