Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Feature: Checkpoint refactor and cross-net message execution #67

Merged
merged 28 commits into from
Apr 10, 2023
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
target: wasm32-unknown-unknown
toolchain: nightly
override: true
- run: cargo b --all --release
- run: cargo t --all --release
- run: cargo b --all
- run: cargo t --all

fmt:
name: Rustfmt
Expand All @@ -38,7 +38,7 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
args: --all --check

clippy:
name: Clippy
Expand All @@ -55,4 +55,4 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
args: --all -- -D clippy::all
17 changes: 8 additions & 9 deletions atomic-exec/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl Actor {
}

let msgs = rt.transaction(|st: &mut State, rt| {
st.modify_atomic_exec(rt.store(), &exec_id, &actors, |entry| {
st.modify_atomic_exec(rt.store(), exec_id, actors, |entry| {
// Record the pre-commitment
entry.insert(from.to_string().unwrap(), params.commit);

Expand Down Expand Up @@ -135,13 +135,12 @@ impl Actor {

// Remove the atomic execution entry
rt.transaction(|st: &mut State, rt| {
st.rm_atomic_exec(rt.store(), &exec_id, &actors)
.map_err(|e| {
e.downcast_default(
ExitCode::USR_ILLEGAL_STATE,
"failed to remove atomic exec from registry",
)
})
st.rm_atomic_exec(rt.store(), exec_id, actors).map_err(|e| {
e.downcast_default(
ExitCode::USR_ILLEGAL_STATE,
"failed to remove atomic exec from registry",
)
})
})?;

Ok(true)
Expand Down Expand Up @@ -180,7 +179,7 @@ impl Actor {
}

let msg = rt.transaction(|st: &mut State, rt| {
st.modify_atomic_exec(rt.store(), &exec_id, &actors, |entry| {
st.modify_atomic_exec(rt.store(), exec_id, actors, |entry| {
// Remove the pre-commitment
entry.remove_entry(&from.to_string().unwrap());

Expand Down
Loading