Skip to content

Commit 9cdffd0

Browse files
committed
Code review feedback
1 parent fbf0f22 commit 9cdffd0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

module-system/sov-state/src/scratchpad.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ impl<S: Storage> Debug for RevertableDelta<S> {
4040
}
4141
}
4242

43-
/// This structure stores the read-write set, which will be persisted in the database at the
44-
/// at the end of the DA slot.
43+
/// This structure is responsible for storing the `read-write` set
44+
/// and is obtained from the `WorkingSet` by using either the `commit` or `revert` method.
4545
pub struct CommittedWorkingSet<S: Storage> {
4646
delta: Delta<S>,
4747
}
@@ -72,7 +72,9 @@ impl<S: Storage> CommittedWorkingSet<S> {
7272
}
7373

7474
/// This structure contains the read-write set and the events collected during the execution of a transaction.
75-
/// The data it contains can be reverted to the most recent committed state.
75+
/// There are two ways to convert it into a CommittedWorkingSet:
76+
/// 1. By using the commit method, where all the changes are added to the underlying CommittedWorkingSet.
77+
/// 2. By using the revert method, where the most recent changes are reverted and the previously committed `CommittedWorkingSet` is returned.
7678
pub struct WorkingSet<S: Storage> {
7779
delta: RevertableDelta<S>,
7880
events: Vec<Event>,

0 commit comments

Comments
 (0)