Add rent estimation rpc (#6109)
* server side new rpc endpoint * client side rpc * take data_len as usize Co-Authored-By: Tyera Eulberg <teulberg@gmail.com> * add test and documentation
This commit is contained in:
@@ -679,6 +679,12 @@ impl Bank {
|
||||
self.blockhash_queue.read().unwrap().last_hash()
|
||||
}
|
||||
|
||||
pub fn get_minimum_balance_for_rent_exemption(&self, data_len: usize) -> u64 {
|
||||
self.rent_collector
|
||||
.rent_calculator
|
||||
.minimum_balance(data_len)
|
||||
}
|
||||
|
||||
pub fn last_blockhash_with_fee_calculator(&self) -> (Hash, FeeCalculator) {
|
||||
let blockhash_queue = self.blockhash_queue.read().unwrap();
|
||||
let last_hash = blockhash_queue.last_hash();
|
||||
|
Reference in New Issue
Block a user