Skip to content

Commit c032b7b

Browse files
committed
Merge branch 'mb/dirk_integration' of github.com:Commit-Boost/commit-boost-client into mb/dirk_integration
2 parents 51fe16d + bb0c37b commit c032b7b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/signer/src/manager/dirk.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ pub struct DirkManager {
7171

7272
impl DirkManager {
7373
pub async fn new_from_config(chain: Chain, config: DirkConfig) -> eyre::Result<Self> {
74-
let mut tls_configs = Vec::new();
74+
let mut tls_configs = Vec::with_capacity(config.hosts.len());
7575

7676
// Create a TLS config for each host
7777
for host in config.hosts.clone() {
@@ -681,8 +681,8 @@ impl DirkManager {
681681
self.sign_with_channel(channel, pubkey, account, domain, object_root).await
682682
}
683683
WalletType::Distributed => {
684-
let mut signatures = Vec::new();
685-
let mut identifiers = Vec::new();
684+
let mut signatures = Vec::with_capacity(account.hosts.len());
685+
let mut identifiers = Vec::with_capacity(account.hosts.len());
686686
let num_hosts_needed = account.signing_threshold as usize;
687687

688688
if account.hosts.len() < num_hosts_needed {

0 commit comments

Comments
 (0)