Restore compatibility for solana rent --output json command (#29953)
This commit is contained in:
parent
c1aac6d430
commit
a9287ab4c6
|
@ -2087,6 +2087,10 @@ pub fn process_transaction_history(
|
||||||
#[derive(Serialize, Deserialize)]
|
#[derive(Serialize, Deserialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
struct CliRentCalculation {
|
struct CliRentCalculation {
|
||||||
|
// lamports_per_* fields are deprecated since all accounts must be rent
|
||||||
|
// exempt; however, they are kept here for the sake of compatibility.
|
||||||
|
pub lamports_per_byte_year: u64,
|
||||||
|
pub lamports_per_epoch: u64,
|
||||||
pub rent_exempt_minimum_lamports: u64,
|
pub rent_exempt_minimum_lamports: u64,
|
||||||
#[serde(skip)]
|
#[serde(skip)]
|
||||||
pub use_lamports_unit: bool,
|
pub use_lamports_unit: bool,
|
||||||
|
@ -2159,6 +2163,8 @@ pub fn process_calculate_rent(
|
||||||
let rent: Rent = rent_account.deserialize_data()?;
|
let rent: Rent = rent_account.deserialize_data()?;
|
||||||
let rent_exempt_minimum_lamports = rent.minimum_balance(data_length);
|
let rent_exempt_minimum_lamports = rent.minimum_balance(data_length);
|
||||||
let cli_rent_calculation = CliRentCalculation {
|
let cli_rent_calculation = CliRentCalculation {
|
||||||
|
lamports_per_byte_year: 0,
|
||||||
|
lamports_per_epoch: 0,
|
||||||
rent_exempt_minimum_lamports,
|
rent_exempt_minimum_lamports,
|
||||||
use_lamports_unit,
|
use_lamports_unit,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue