File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
module-system/sov-state/src Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -40,8 +40,8 @@ impl<S: Storage> Debug for RevertableDelta<S> {
40
40
}
41
41
}
42
42
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 .
45
45
pub struct CommittedWorkingSet < S : Storage > {
46
46
delta : Delta < S > ,
47
47
}
@@ -72,7 +72,9 @@ impl<S: Storage> CommittedWorkingSet<S> {
72
72
}
73
73
74
74
/// 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.
76
78
pub struct WorkingSet < S : Storage > {
77
79
delta : RevertableDelta < S > ,
78
80
events : Vec < Event > ,
You can’t perform that action at this time.
0 commit comments