MCPcopy Create free account
hub / github.com/ChainSafe/Delorean-Protocol / take_dropper

Method take_dropper

fendermint/testing/materializer/src/docker/mod.rs:276–283  ·  view source on GitHub ↗

Replace the dropper with a new one and return the existing one so that we can await all the drop tasks being completed.

(&mut self)

Source from the content-addressed store, hash-verified

274
275 /// Replace the dropper with a new one and return the existing one so that we can await all the drop tasks being completed.
276 pub fn take_dropper(&mut self) -> DropHandle {
277 let (mut drop_handle, mut drop_chute) = dropper::start(self.docker.clone());
278 std::mem::swap(&mut drop_handle, &mut self.drop_handle);
279 std::mem::swap(&mut drop_chute, &mut self.drop_chute);
280 // By dropping the `drop_chute` the only the existing docker constructs will keep a reference to it.
281 // The caller can decide when it's time to wait on the handle, when the testnet have been dropped.
282 drop_handle
283 }
284
285 /// Path to a directory based on a resource name.
286 fn path<T: AsRef<ResourceName>>(&self, name: T) -> PathBuf {

Callers 1

with_testnetFunction · 0.80

Calls 1

startFunction · 0.85

Tested by 1

with_testnetFunction · 0.64