Rpc: enable getConfirmedBlock and getConfirmedTransaction to return confirmed (not yet finalized) data (#16142)
* Add Blockstore block and tx apis that allow unrooted responses * Add TransactionStatusMessage, and send on bank freeze; also refactor TransactionStatusSender * Track highest slot with tx-status writes complete * Rename and unpub fn * Add commitment to GetConfirmed input configs * Support confirmed blocks in getConfirmedBlock * Support confirmed txs in getConfirmedTransaction * Update sigs-for-addr2 comment * Enable confirmed block in cli * Enable confirmed transaction in cli * Review comments * Rename blockstore method
This commit is contained in:
@ -108,6 +108,10 @@ impl CommitmentConfig {
|
||||
)
|
||||
}
|
||||
|
||||
pub fn is_at_least_confirmed(&self) -> bool {
|
||||
self.is_confirmed() || self.is_finalized()
|
||||
}
|
||||
|
||||
pub fn use_deprecated_commitment(commitment: CommitmentConfig) -> Self {
|
||||
match commitment.commitment {
|
||||
CommitmentLevel::Finalized => CommitmentConfig::max(),
|
||||
|
Reference in New Issue
Block a user