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

Method update_state

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

Update the state, save it to JSON, then return whatever value the update returns.

(&mut self, f: F)

Source from the content-addressed store, hash-verified

333
334 /// Update the state, save it to JSON, then return whatever value the update returns.
335 fn update_state<F, T>(&mut self, f: F) -> anyhow::Result<T>
336 where
337 F: FnOnce(&mut DockerMaterializerState) -> T,
338 {
339 let value = f(&mut self.state);
340 self.save_state()?;
341 Ok(value)
342 }
343
344 /// Write the state to a JSON file.
345 fn save_state(&self) -> anyhow::Result<()> {

Callers 1

port_rangeMethod · 0.80

Calls 1

save_stateMethod · 0.80

Tested by

no test coverage detected