Deprecate commitment variants (#14797)
* Deprecate commitment variants * Add new CommitmentConfig builders * Add helpers to avoid allowing deprecated variants * Remove deprecated transaction-status code * Include new commitment variants in runtime commitment; allow deprecated as long as old variants persist * Remove deprecated banks code * Remove deprecated variants in core; allow deprecated in rpc/rpc-subscriptions for now * Heavier hand with rpc/rpc-subscription commitment * Remove deprecated variants from local-cluster * Remove deprecated variants from various tools * Remove deprecated variants from validator * Update docs * Remove deprecated client code * Add new variants to cli; remove deprecated variants as possible * Don't send new commitment variants to old clusters * Retain deprecated method in test_validator_saves_tower * Fix clippy matches! suggestion for BPF solana-sdk legacy compile test * Refactor node version check to handle commitment variants and transaction encoding * Hide deprecated variants from cli help * Add cli App comments
This commit is contained in:
@ -437,7 +437,7 @@ impl CliConfig<'_> {
|
||||
}
|
||||
|
||||
fn default_commitment() -> CommitmentConfig {
|
||||
CommitmentConfig::single_gossip()
|
||||
CommitmentConfig::confirmed()
|
||||
}
|
||||
|
||||
fn first_nonempty_setting(
|
||||
@ -532,10 +532,10 @@ impl CliConfig<'_> {
|
||||
|
||||
pub fn recent_for_tests() -> Self {
|
||||
Self {
|
||||
commitment: CommitmentConfig::recent(),
|
||||
commitment: CommitmentConfig::processed(),
|
||||
send_transaction_config: RpcSendTransactionConfig {
|
||||
skip_preflight: true,
|
||||
preflight_commitment: Some(CommitmentConfig::recent().commitment),
|
||||
preflight_commitment: Some(CommitmentConfig::processed().commitment),
|
||||
..RpcSendTransactionConfig::default()
|
||||
},
|
||||
..Self::default()
|
||||
@ -558,7 +558,7 @@ impl Default for CliConfig<'_> {
|
||||
rpc_timeout: Duration::from_secs(u64::from_str(DEFAULT_RPC_TIMEOUT_SECONDS).unwrap()),
|
||||
verbose: false,
|
||||
output_format: OutputFormat::Display,
|
||||
commitment: CommitmentConfig::single_gossip(),
|
||||
commitment: CommitmentConfig::confirmed(),
|
||||
send_transaction_config: RpcSendTransactionConfig::default(),
|
||||
address_labels: HashMap::new(),
|
||||
}
|
||||
|
Reference in New Issue
Block a user