chore: fix some typos (#33833)
* fix spelling of "retrieved" * fix spelling of "should" * fix spelling of "comparisons"
This commit is contained in:
parent
78c31aa6b8
commit
af7fd32f4c
|
@ -5882,7 +5882,7 @@ impl AccountsDb {
|
||||||
self.purge_slot_cache(*remove_slot, slot_cache);
|
self.purge_slot_cache(*remove_slot, slot_cache);
|
||||||
remove_cache_elapsed.stop();
|
remove_cache_elapsed.stop();
|
||||||
remove_cache_elapsed_across_slots += remove_cache_elapsed.as_us();
|
remove_cache_elapsed_across_slots += remove_cache_elapsed.as_us();
|
||||||
// Nobody else shoud have removed the slot cache entry yet
|
// Nobody else should have removed the slot cache entry yet
|
||||||
assert!(self.accounts_cache.remove_slot(*remove_slot).is_some());
|
assert!(self.accounts_cache.remove_slot(*remove_slot).is_some());
|
||||||
} else {
|
} else {
|
||||||
self.purge_slot_storage(*remove_slot, purge_stats);
|
self.purge_slot_storage(*remove_slot, purge_stats);
|
||||||
|
|
|
@ -1517,18 +1517,18 @@ mod tests {
|
||||||
let len = combined.len();
|
let len = combined.len();
|
||||||
assert_eq!(cumulative.total_count(), len);
|
assert_eq!(cumulative.total_count(), len);
|
||||||
(0..combined.len()).for_each(|start| {
|
(0..combined.len()).for_each(|start| {
|
||||||
let mut retreived = Vec::default();
|
let mut retrieved = Vec::default();
|
||||||
let mut cumulative_start = start;
|
let mut cumulative_start = start;
|
||||||
// read all data
|
// read all data
|
||||||
while retreived.len() < (len - start) {
|
while retrieved.len() < (len - start) {
|
||||||
let this_one = cumulative.get_slice(cumulative_start);
|
let this_one = cumulative.get_slice(cumulative_start);
|
||||||
retreived.extend(this_one.iter());
|
retrieved.extend(this_one.iter());
|
||||||
cumulative_start += this_one.len();
|
cumulative_start += this_one.len();
|
||||||
assert_ne!(0, this_one.len());
|
assert_ne!(0, this_one.len());
|
||||||
}
|
}
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
&combined[start..],
|
&combined[start..],
|
||||||
&retreived[..],
|
&retrieved[..],
|
||||||
"permutation: {permutation}"
|
"permutation: {permutation}"
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
|
@ -21,7 +21,7 @@ echo "$A -> M:$MAJOR m:$MINOR p:$PATCH s:$SPECIAL. Expect M:1 m:3 p:2 s:"
|
||||||
semverParseInto $E MAJOR MINOR PATCH SPECIAL
|
semverParseInto $E MAJOR MINOR PATCH SPECIAL
|
||||||
echo "$E -> M:$MAJOR m:$MINOR p:$PATCH s:$SPECIAL. Expect M:1 m:3 p:2 s:a"
|
echo "$E -> M:$MAJOR m:$MINOR p:$PATCH s:$SPECIAL. Expect M:1 m:3 p:2 s:a"
|
||||||
|
|
||||||
echo "Equality comparisions"
|
echo "Equality comparisons"
|
||||||
semverEQ $A $A
|
semverEQ $A $A
|
||||||
echo "$A == $A -> $?. Expect 0."
|
echo "$A == $A -> $?. Expect 0."
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ semverGT $A $A
|
||||||
echo "$A > $A -> $?. Expect 1."
|
echo "$A > $A -> $?. Expect 1."
|
||||||
|
|
||||||
|
|
||||||
echo "Major number comparisions"
|
echo "Major number comparisons"
|
||||||
semverEQ $A $B
|
semverEQ $A $B
|
||||||
echo "$A == $B -> $?. Expect 1."
|
echo "$A == $B -> $?. Expect 1."
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ semverGT $B $A
|
||||||
echo "$B > $A -> $?. Expect 0."
|
echo "$B > $A -> $?. Expect 0."
|
||||||
|
|
||||||
|
|
||||||
echo "Minor number comparisions"
|
echo "Minor number comparisons"
|
||||||
semverEQ $A $C
|
semverEQ $A $C
|
||||||
echo "$A == $C -> $?. Expect 1."
|
echo "$A == $C -> $?. Expect 1."
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ echo "$C < $A -> $?. Expect 1."
|
||||||
semverGT $C $A
|
semverGT $C $A
|
||||||
echo "$C > $A -> $?. Expect 0."
|
echo "$C > $A -> $?. Expect 0."
|
||||||
|
|
||||||
echo "patch number comparisions"
|
echo "patch number comparisons"
|
||||||
semverEQ $A $D
|
semverEQ $A $D
|
||||||
echo "$A == $D -> $?. Expect 1."
|
echo "$A == $D -> $?. Expect 1."
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ echo "$D < $A -> $?. Expect 1."
|
||||||
semverGT $D $A
|
semverGT $D $A
|
||||||
echo "$D > $A -> $?. Expect 0."
|
echo "$D > $A -> $?. Expect 0."
|
||||||
|
|
||||||
echo "special section vs no special comparisions"
|
echo "special section vs no special comparisons"
|
||||||
semverEQ $A $E
|
semverEQ $A $E
|
||||||
echo "$A == $E -> $?. Expect 1."
|
echo "$A == $E -> $?. Expect 1."
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ echo "$E < $A -> $?. Expect 0."
|
||||||
semverGT $E $A
|
semverGT $E $A
|
||||||
echo "$E > $A -> $?. Expect 1."
|
echo "$E > $A -> $?. Expect 1."
|
||||||
|
|
||||||
echo "special section vs special comparisions"
|
echo "special section vs special comparisons"
|
||||||
semverEQ $E $F
|
semverEQ $E $F
|
||||||
echo "$E == $F -> $?. Expect 1."
|
echo "$E == $F -> $?. Expect 1."
|
||||||
|
|
||||||
|
|
|
@ -713,7 +713,7 @@ mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
// case 3: add tx writes to [acct1, acct2], acct2 exceeds limit, should failed atomically,
|
// case 3: add tx writes to [acct1, acct2], acct2 exceeds limit, should failed atomically,
|
||||||
// we shoudl still have:
|
// we should still have:
|
||||||
// | acct1 | $cost |
|
// | acct1 | $cost |
|
||||||
// | acct2 | $cost * 2 |
|
// | acct2 | $cost * 2 |
|
||||||
// | acct3 | $cost |
|
// | acct3 | $cost |
|
||||||
|
|
|
@ -3674,7 +3674,7 @@ function assertSpan(group) {
|
||||||
// '\expandafter\show\the\scriptscriptfont2' \
|
// '\expandafter\show\the\scriptscriptfont2' \
|
||||||
// '\stop'
|
// '\stop'
|
||||||
//
|
//
|
||||||
// The metrics themselves were retreived using the following commands:
|
// The metrics themselves were retrieved using the following commands:
|
||||||
//
|
//
|
||||||
// tftopl cmsy10
|
// tftopl cmsy10
|
||||||
// tftopl cmsy7
|
// tftopl cmsy7
|
||||||
|
|
|
@ -3698,7 +3698,7 @@ var metricMap = {
|
||||||
// '\expandafter\show\the\scriptscriptfont2' \
|
// '\expandafter\show\the\scriptscriptfont2' \
|
||||||
// '\stop'
|
// '\stop'
|
||||||
//
|
//
|
||||||
// The metrics themselves were retreived using the following commands:
|
// The metrics themselves were retrieved using the following commands:
|
||||||
//
|
//
|
||||||
// tftopl cmsy10
|
// tftopl cmsy10
|
||||||
// tftopl cmsy7
|
// tftopl cmsy7
|
||||||
|
|
|
@ -1461,7 +1461,7 @@ pub fn create_nonce_account(
|
||||||
///
|
///
|
||||||
/// When constructing a transaction that includes an `AdvanceNonceInstruction`
|
/// When constructing a transaction that includes an `AdvanceNonceInstruction`
|
||||||
/// the [`recent_blockhash`] must be treated differently — instead of
|
/// the [`recent_blockhash`] must be treated differently — instead of
|
||||||
/// setting it to a recent blockhash, the value of the nonce must be retreived
|
/// setting it to a recent blockhash, the value of the nonce must be retrieved
|
||||||
/// and deserialized from the nonce account, and that value specified as the
|
/// and deserialized from the nonce account, and that value specified as the
|
||||||
/// "recent blockhash". A nonce account can be deserialized with the
|
/// "recent blockhash". A nonce account can be deserialized with the
|
||||||
/// [`solana_rpc_client_nonce_utils::data_from_account`][dfa] function.
|
/// [`solana_rpc_client_nonce_utils::data_from_account`][dfa] function.
|
||||||
|
|
Loading…
Reference in New Issue