-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FVM] refactor5- simplify storage limit checker code #950
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much cleaner! Nice!
@@ -186,6 +186,10 @@ func (e *ScriptEnv) ValueExists(owner, key []byte) (exists bool, err error) { | |||
return len(v) > 0, nil | |||
} | |||
|
|||
func (e *ScriptEnv) AccountExists(address common.Address) (exists bool, err error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see this being used anywhere, or did I miss something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not used anywhere yet, but I need it for the next PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
||
// does it exist? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we no longer need to check for existence?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to check existence accounts that are passed are already checked and if accounts not exist it would return zero capacity so it errors out.
func (e *ScriptEnv) EmitEvent(event cadence.Event) error { | ||
return errors.NewOperationNotSupportedError("EmitEvent") | ||
} | ||
|
||
func (e *ScriptEnv) Events() []flow.Event { | ||
return []flow.Event{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why simply not nil
?
This PR: