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:
@@ -418,7 +418,7 @@ mod test {
|
||||
.unwrap();
|
||||
|
||||
rpc_client
|
||||
.poll_for_signature_with_commitment(&stake1_signature, CommitmentConfig::recent())
|
||||
.poll_for_signature_with_commitment(&stake1_signature, CommitmentConfig::processed())
|
||||
.unwrap();
|
||||
|
||||
// A balance increase by system transfer is ignored
|
||||
@@ -473,7 +473,7 @@ mod test {
|
||||
rpc_client
|
||||
.poll_for_signature_with_commitment(
|
||||
&stake3_initialize_signature,
|
||||
CommitmentConfig::recent(),
|
||||
CommitmentConfig::processed(),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
@@ -504,7 +504,7 @@ mod test {
|
||||
rpc_client
|
||||
.poll_for_signature_with_commitment(
|
||||
&stake3_withdraw_signature,
|
||||
CommitmentConfig::recent(),
|
||||
CommitmentConfig::processed(),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
@@ -529,7 +529,7 @@ mod test {
|
||||
rpc_client
|
||||
.poll_for_signature_with_commitment(
|
||||
&stake4_initialize_signature,
|
||||
CommitmentConfig::recent(),
|
||||
CommitmentConfig::processed(),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
@@ -560,7 +560,7 @@ mod test {
|
||||
rpc_client
|
||||
.poll_for_signature_with_commitment(
|
||||
&stake45_split_signature,
|
||||
CommitmentConfig::recent(),
|
||||
CommitmentConfig::processed(),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
@@ -577,12 +577,15 @@ mod test {
|
||||
))
|
||||
.unwrap();
|
||||
rpc_client
|
||||
.poll_for_signature_with_commitment(&fund_system1_signature, CommitmentConfig::recent())
|
||||
.poll_for_signature_with_commitment(
|
||||
&fund_system1_signature,
|
||||
CommitmentConfig::processed(),
|
||||
)
|
||||
.unwrap();
|
||||
accounts_info.enroll_system_account(
|
||||
&system1_keypair.pubkey(),
|
||||
rpc_client
|
||||
.get_slot_with_commitment(CommitmentConfig::recent())
|
||||
.get_slot_with_commitment(CommitmentConfig::processed())
|
||||
.unwrap(),
|
||||
2 * one_sol,
|
||||
);
|
||||
@@ -616,12 +619,15 @@ mod test {
|
||||
))
|
||||
.unwrap();
|
||||
rpc_client
|
||||
.poll_for_signature_with_commitment(&fund_system2_signature, CommitmentConfig::recent())
|
||||
.poll_for_signature_with_commitment(
|
||||
&fund_system2_signature,
|
||||
CommitmentConfig::processed(),
|
||||
)
|
||||
.unwrap();
|
||||
accounts_info.enroll_system_account(
|
||||
&system2_keypair.pubkey(),
|
||||
rpc_client
|
||||
.get_slot_with_commitment(CommitmentConfig::recent())
|
||||
.get_slot_with_commitment(CommitmentConfig::processed())
|
||||
.unwrap(),
|
||||
2 * one_sol,
|
||||
);
|
||||
@@ -644,7 +650,7 @@ mod test {
|
||||
|
||||
// Process all the transactions
|
||||
let current_slot = rpc_client
|
||||
.get_slot_with_commitment(CommitmentConfig::recent())
|
||||
.get_slot_with_commitment(CommitmentConfig::processed())
|
||||
.unwrap();
|
||||
process_slots(&rpc_client, &mut accounts_info, current_slot + 1);
|
||||
|
||||
|
Reference in New Issue
Block a user