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

Method commit

fendermint/storage/src/im.rs:122–127  ·  view source on GitHub ↗

An exclusive lock has already been taken.

(mut self)

Source from the content-addressed store, hash-verified

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