Commit the state. It must not fail, but we're returning a result so that error handling can be done in the application root. For now this is not part of the `Interpreter` because it's not clear what atomic semantics we can hope to provide if the middlewares call each other: did it go all the way down, or did it stop somewhere? Easier to have one commit of the state as a whole.
(mut self)
| 307 | /// all the way down, or did it stop somewhere? Easier to have one commit of the state |
| 308 | /// as a whole. |
| 309 | pub fn commit(mut self) -> anyhow::Result<(Cid, FvmUpdatableParams, bool)> { |
| 310 | let cid = self.executor.flush()?; |
| 311 | Ok((cid, self.params, self.params_dirty)) |
| 312 | } |
| 313 | |
| 314 | /// Flush and return the current state root without consuming the execution state. |
| 315 | pub fn flush_state_root(&mut self) -> anyhow::Result<Cid> { |
no test coverage detected