Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Rename set_pending to replace_pending for clearity
Browse files Browse the repository at this point in the history
  • Loading branch information
athei committed May 19, 2020
1 parent fe48580 commit 58fb712
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions primitives/state-machine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ impl<'a, B, H, N, Exec> StateMachine<'a, B, H, N, Exec> where
let (result, was_native) = self.execute_aux(true, native_call.take());

if was_native {
self.overlay.set_pending(pending_changes);
self.overlay.replace_pending(pending_changes);
let (wasm_result, _) = self.execute_aux(
false,
native_call,
Expand Down Expand Up @@ -385,7 +385,7 @@ impl<'a, B, H, N, Exec> StateMachine<'a, B, H, N, Exec> where
if !was_native || result.is_ok() {
result
} else {
self.overlay.set_pending(pending_changes);
self.overlay.replace_pending(pending_changes);
let (wasm_result, _) = self.execute_aux(
false,
native_call,
Expand Down
2 changes: 1 addition & 1 deletion primitives/state-machine/src/overlayed_changes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ impl OverlayedChanges {
}

/// Replace the currently pending changes.
pub fn set_pending(&mut self, pending: OverlayedChangeSet) {
pub fn replace_pending(&mut self, pending: OverlayedChangeSet) {
self.prospective = pending;
}

Expand Down

0 comments on commit 58fb712

Please sign in to comment.