@@ -21,7 +21,7 @@ const (
2121// it holds draft of updates and captures
2222// all register touches
2323type ExecutionState struct {
24- // NOTE: A finalized view is no longer accessible. It can however be
24+ // NOTE: A finalized state is no longer accessible. It can however be
2525 // re-attached to another transaction and be committed (for cached result
2626 // bookkeeping purpose).
2727 finalized bool
@@ -144,7 +144,7 @@ func (state *ExecutionState) BytesWritten() uint64 {
144144
145145func (state * ExecutionState ) DropChanges () error {
146146 if state .finalized {
147- return fmt .Errorf ("cannot DropChanges on a finalized view " )
147+ return fmt .Errorf ("cannot DropChanges on a finalized state " )
148148 }
149149
150150 return state .view .DropChanges ()
@@ -153,7 +153,7 @@ func (state *ExecutionState) DropChanges() error {
153153// Get returns a register value given owner and key
154154func (state * ExecutionState ) Get (id flow.RegisterID ) (flow.RegisterValue , error ) {
155155 if state .finalized {
156- return nil , fmt .Errorf ("cannot Get on a finalized view " )
156+ return nil , fmt .Errorf ("cannot Get on a finalized state " )
157157 }
158158
159159 var value []byte
@@ -179,7 +179,7 @@ func (state *ExecutionState) Get(id flow.RegisterID) (flow.RegisterValue, error)
179179// Set updates state delta with a register update
180180func (state * ExecutionState ) Set (id flow.RegisterID , value flow.RegisterValue ) error {
181181 if state .finalized {
182- return fmt .Errorf ("cannot Set on a finalized view " )
182+ return fmt .Errorf ("cannot Set on a finalized state " )
183183 }
184184
185185 if state .enforceLimits {
@@ -201,7 +201,7 @@ func (state *ExecutionState) Set(id flow.RegisterID, value flow.RegisterValue) e
201201// MeterComputation meters computation usage
202202func (state * ExecutionState ) MeterComputation (kind common.ComputationKind , intensity uint ) error {
203203 if state .finalized {
204- return fmt .Errorf ("cannot MeterComputation on a finalized view " )
204+ return fmt .Errorf ("cannot MeterComputation on a finalized state " )
205205 }
206206
207207 if state .enforceLimits {
@@ -228,7 +228,7 @@ func (state *ExecutionState) TotalComputationLimit() uint {
228228// MeterMemory meters memory usage
229229func (state * ExecutionState ) MeterMemory (kind common.MemoryKind , intensity uint ) error {
230230 if state .finalized {
231- return fmt .Errorf ("cannot MeterMemory on a finalized view " )
231+ return fmt .Errorf ("cannot MeterMemory on a finalized state " )
232232 }
233233
234234 if state .enforceLimits {
@@ -255,7 +255,7 @@ func (state *ExecutionState) TotalMemoryLimit() uint {
255255
256256func (state * ExecutionState ) MeterEmittedEvent (byteSize uint64 ) error {
257257 if state .finalized {
258- return fmt .Errorf ("cannot MeterEmittedEvent on a finalized view " )
258+ return fmt .Errorf ("cannot MeterEmittedEvent on a finalized state " )
259259 }
260260
261261 if state .enforceLimits {
@@ -279,7 +279,7 @@ func (state *ExecutionState) Finalize() *ExecutionSnapshot {
279279// MergeState the changes from a the given view to this view.
280280func (state * ExecutionState ) Merge (other * ExecutionSnapshot ) error {
281281 if state .finalized {
282- return fmt .Errorf ("cannot Merge on a finalized view " )
282+ return fmt .Errorf ("cannot Merge on a finalized state " )
283283 }
284284
285285 err := state .view .Merge (other )
0 commit comments