We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d8b147 commit 01ccf40Copy full SHA for 01ccf40
packages/rs-context-provider/src/provider.rs
@@ -190,8 +190,10 @@ where
190
core_chain_locked_height: u32,
191
) -> Pin<Box<dyn Future<Output = Result<[u8; 48], ContextProviderError>> + Send + 'static>>
192
{
193
- let lock = self.lock().expect("lock poisoned");
194
- lock.get_quorum_public_key_async(quorum_type, quorum_hash, core_chain_locked_height)
+ // Compute synchronously under the lock, then return a ready future.
+ // This avoids holding the MutexGuard across await points which would be unsound.
195
+ let result = self.get_quorum_public_key(quorum_type, quorum_hash, core_chain_locked_height);
196
+ Box::pin(async move { result })
197
}
198
199
fn get_quorum_public_key(
0 commit comments