dcou: make internal function `pub` conditionally (#32822)
dcou: make internal function pub conditionally
This commit is contained in:
parent
58cca78067
commit
ce63640d6d
|
@ -4101,6 +4101,17 @@ dependencies = [
|
|||
"percent-encoding 2.3.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "qualifier_attr"
|
||||
version = "0.1.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a696aef893ed46a96ed81163ef58856b2da620c2eb4b38623253ad215c600b1d"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.28",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quick-error"
|
||||
version = "1.2.3"
|
||||
|
@ -5225,6 +5236,7 @@ dependencies = [
|
|||
"once_cell",
|
||||
"ouroboros",
|
||||
"percentage",
|
||||
"qualifier_attr",
|
||||
"rand 0.7.3",
|
||||
"rand_chacha 0.2.2",
|
||||
"rayon",
|
||||
|
|
|
@ -259,6 +259,7 @@ prost = "0.11.9"
|
|||
prost-types = "0.11.9"
|
||||
protobuf-src = "1.1.0"
|
||||
qstring = "0.7.2"
|
||||
qualifier_attr = "0.1.6"
|
||||
quinn = "0.10.2"
|
||||
quinn-proto = "0.10.2"
|
||||
quote = "1.0"
|
||||
|
|
|
@ -39,6 +39,7 @@ num_enum = { workspace = true }
|
|||
once_cell = { workspace = true }
|
||||
ouroboros = { workspace = true }
|
||||
percentage = { workspace = true }
|
||||
qualifier_attr = { workspace = true }
|
||||
rand = { workspace = true }
|
||||
rayon = { workspace = true }
|
||||
regex = { workspace = true }
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
//! tracks the number of commits to the entire data store. So the latest
|
||||
//! commit for each slot entry would be indexed.
|
||||
|
||||
#[cfg(feature = "dev-context-only-utils")]
|
||||
use qualifier_attr::fn_qualifiers;
|
||||
use {
|
||||
crate::{
|
||||
account_info::{AccountInfo, StorageLocation},
|
||||
|
@ -7898,6 +7900,7 @@ impl AccountsDb {
|
|||
/// Set the accounts delta hash for `slot` in the `accounts_delta_hashes` map
|
||||
///
|
||||
/// returns the previous accounts delta hash for `slot`
|
||||
#[cfg_attr(feature = "dev-context-only-utils", fn_qualifiers(pub))]
|
||||
fn set_accounts_delta_hash(
|
||||
&self,
|
||||
slot: Slot,
|
||||
|
@ -9581,14 +9584,6 @@ impl AccountsDb {
|
|||
&self.accounts_delta_hashes
|
||||
}
|
||||
|
||||
pub fn set_accounts_delta_hash_for_tests(
|
||||
&self,
|
||||
slot: Slot,
|
||||
accounts_delta_hash: AccountsDeltaHash,
|
||||
) {
|
||||
self.set_accounts_delta_hash(slot, accounts_delta_hash);
|
||||
}
|
||||
|
||||
pub fn accounts_hashes(&self) -> &Mutex<HashMap<Slot, (AccountsHash, /*capitalization*/ u64)>> {
|
||||
&self.accounts_hashes
|
||||
}
|
||||
|
|
|
@ -3631,6 +3631,17 @@ dependencies = [
|
|||
"percent-encoding 2.3.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "qualifier_attr"
|
||||
version = "0.1.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a696aef893ed46a96ed81163ef58856b2da620c2eb4b38623253ad215c600b1d"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.28",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quinn"
|
||||
version = "0.10.2"
|
||||
|
@ -4560,6 +4571,7 @@ dependencies = [
|
|||
"once_cell",
|
||||
"ouroboros",
|
||||
"percentage",
|
||||
"qualifier_attr",
|
||||
"rand 0.7.3",
|
||||
"rayon",
|
||||
"regex",
|
||||
|
|
|
@ -352,10 +352,7 @@ mod tests {
|
|||
bank.rc
|
||||
.accounts
|
||||
.accounts_db
|
||||
.set_accounts_delta_hash_for_tests(
|
||||
bank.slot(),
|
||||
AccountsDeltaHash(Hash::new_unique()),
|
||||
);
|
||||
.set_accounts_delta_hash(bank.slot(), AccountsDeltaHash(Hash::new_unique()));
|
||||
bank.rc
|
||||
.accounts
|
||||
.accounts_db
|
||||
|
@ -546,7 +543,7 @@ mod tests {
|
|||
bank.rc
|
||||
.accounts
|
||||
.accounts_db
|
||||
.set_accounts_delta_hash_for_tests(bank.slot(), AccountsDeltaHash(Hash::new_unique()));
|
||||
.set_accounts_delta_hash(bank.slot(), AccountsDeltaHash(Hash::new_unique()));
|
||||
bank.rc
|
||||
.accounts
|
||||
.accounts_db
|
||||
|
@ -628,10 +625,7 @@ mod tests {
|
|||
bank.rc
|
||||
.accounts
|
||||
.accounts_db
|
||||
.set_accounts_delta_hash_for_tests(
|
||||
bank.slot(),
|
||||
AccountsDeltaHash(Hash::new_unique()),
|
||||
);
|
||||
.set_accounts_delta_hash(bank.slot(), AccountsDeltaHash(Hash::new_unique()));
|
||||
bank.rc
|
||||
.accounts
|
||||
.accounts_db
|
||||
|
|
Loading…
Reference in New Issue