* Use last_valid_block_height in services and client apps (#19163)
* Add deprecated tag to Bank::get_blockhash_last_valid_slot
* Update SendTransactionService to use last_valid_block_height
* Update solana-tokens to use last_valid_block_height
* Remove dangling file
* Update solana program to use last_valid_block_height
* Update Banks crates to use last_valid_block_height
(cherry picked from commit 5970083b4d
)
# Conflicts:
# cli/src/program.rs
* Fix conflict
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
This commit is contained in:
@@ -2534,7 +2534,10 @@ impl Bank {
|
||||
&self.fee_rate_governor
|
||||
}
|
||||
|
||||
// DEPRECATED
|
||||
#[deprecated(
|
||||
since = "1.6.11",
|
||||
note = "Please use `get_blockhash_last_valid_block_height`"
|
||||
)]
|
||||
pub fn get_blockhash_last_valid_slot(&self, blockhash: &Hash) -> Option<Slot> {
|
||||
let blockhash_queue = self.blockhash_queue.read().unwrap();
|
||||
// This calculation will need to be updated to consider epoch boundaries if BlockhashQueue
|
||||
|
@@ -156,6 +156,7 @@ impl SyncClient for BankClient {
|
||||
_commitment_config: CommitmentConfig,
|
||||
) -> Result<(Hash, FeeCalculator, u64)> {
|
||||
let (blockhash, fee_calculator) = self.bank.last_blockhash_with_fee_calculator();
|
||||
#[allow(deprecated)]
|
||||
let last_valid_slot = self
|
||||
.bank
|
||||
.get_blockhash_last_valid_slot(&blockhash)
|
||||
|
Reference in New Issue
Block a user