MCPcopy Create free account
hub / github.com/SeismicSystems/summit / create_test_keystore

Function create_test_keystore

rpc/tests/utils.rs:164–181  ·  view source on GitHub ↗

Creates a temporary key store directory with test keys

()

Source from the content-addressed store, hash-verified

162 }
163 }
164 });
165
166 (query, handle)
167}
168
169/// A mock state-query mailbox whose `GenerateStateProof` responses are gated:
170/// every received proof request increments `received` and then blocks until the
171/// returned one-shot release trigger fires, letting a test hold many proof
172/// generations in flight at once. Each request is handled in its own spawned
173/// task (mirroring the finalizer's off-loop proof spawn) so the mock keeps
174/// accepting requests while earlier ones are held open.
175///
176/// Returns the query handle, an in-flight-received counter, and the release
177/// trigger (drop or send `()` to let all held requests complete).
178pub fn create_gated_proof_mailbox() -> (
179 ConsensusStateQuery<TestScheme>,
180 Arc<AtomicUsize>,
181 oneshot::Sender<()>,
182 JoinHandle<()>,
183) {
184 let (query, mut rx) = ConsensusStateQuery::new(1024);

Callers 11

test_health_endpointFunction · 0.85
test_get_latest_heightFunction · 0.85
test_get_latest_epochFunction · 0.85
test_get_public_keysFunction · 0.85
test_send_genesisFunction · 0.85
test_get_minimum_stakeFunction · 0.85
test_get_maximum_stakeFunction · 0.85

Calls 1

pathMethod · 0.80

Tested by

no test coverage detected