Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Check ABI for notifications #2810
Check ABI for notifications #2810
Changes from 14 commits
e88062f
f0b3071
c7e9ced
95ee47e
a426a29
e3db758
95b9983
8cb741b
75829a9
080695d
b812394
93b4126
be2ef40
780103a
3f10c96
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
And the last question from my side: if we have
Null
stackitem passed as notification parameter and in manifest it is declaredContractParameterType.String
, what should happen? The previous version allowed this, but seems that the current code will throw theInvalidCastException
exception onitem.GetSpan()
call forNull
stackitem. But I think it's valid to passNull
stackitem asContractParameterType.String
.@shargon, @roman-khimov, what do you think?
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.
@AnnaShaleva, you're programming in Go,
string
can't be null there!Jokes aside, I don't think I have any strong preference here. I'm slightly more in favor of making strings always have some contents (even if it's "", basically the way it is now), but if there are useful cases where
Null
is applicable, we can accept it too. We can also try having more strict policy for now and then relax it if needed (it's always easier than the other way around).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.
Let's then adjust a bit the current check so that it'll be more explicit:
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.
StackItemType.Any
normal indicatesNULL
. But normally depends on where it is.you can always check for
StackItem.IsNull
orStackItem.Null
Maybe treat strings the same as
string.IsNullOrEmpty()
does.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 think that should be empty, not null
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.
@shargon, good, then see the #2810 (comment), please.