MCPcopy Create free account
hub / github.com/consensus-shipyard/ipc / commit

Method commit

fendermint/storage/src/im.rs:125–130  ·  view source on GitHub ↗

An exclusive lock has already been taken.

(mut self)

Source from the content-addressed store, hash-verified

123impl<S: KVStore> KVTransaction for Transaction<'_, S, Write> {
124 // An exclusive lock has already been taken.
125 fn commit(mut self) -> KVResult<()> {
126 let mut guard = self.backend.data.lock().unwrap();
127 *guard = mem::take(&mut self.data);
128 mem::take(&mut self.token);
129 Ok(())
130 }
131
132 fn rollback(mut self) -> KVResult<()> {
133 mem::take(&mut self.token);

Callers 3

with_writeMethod · 0.45
check_read_isolationFunction · 0.45

Calls

no outgoing calls

Tested by 2

check_read_isolationFunction · 0.36