Rpc: enable getConfirmedBlock and getConfirmedTransaction to return confirmed (not yet finalized) data (bp #16142) (#16159)
* 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
(cherry picked from commit 433f1ead1c
)
# Conflicts:
# core/src/replay_stage.rs
# core/src/rpc.rs
# core/src/validator.rs
* Fix conflicts
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
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