Rent tangential stuff (#5910)

* rename rent.rs to rent_calculator.rs

* add rent sysvar

* integrate rent_calculator with bank

* rent_calculator integration with genesis

* add test for rent sysvar
This commit is contained in:
Parth
2019-09-17 17:12:55 +05:30
committed by GitHub
parent b31d334ef4
commit d63518a835
11 changed files with 157 additions and 30 deletions

View File

@@ -83,7 +83,7 @@ mod bpf {
use solana_sdk::instruction::{AccountMeta, Instruction};
use solana_sdk::pubkey::Pubkey;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::sysvar::{clock, fees, rewards, slot_hashes, stake_history};
use solana_sdk::sysvar::{clock, fees, rewards, slot_hashes, stake_history, rent};
use std::io::Read;
use std::sync::Arc;
@@ -132,6 +132,7 @@ mod bpf {
AccountMeta::new(rewards::id(), false),
AccountMeta::new(slot_hashes::id(), false),
AccountMeta::new(stake_history::id(), false),
AccountMeta::new(rent::id(), false)
];
let instruction = Instruction::new(program_id, &1u8, account_metas);
let result = bank_client.send_instruction(&mint_keypair, instruction);