-
Notifications
You must be signed in to change notification settings - Fork 461
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
Use existing array for precompile result #7001
Conversation
@@ -29,7 +29,7 @@ public long DataGasCost(in ReadOnlyMemory<byte> inputData, IReleaseSpec releaseS | |||
|
|||
public (ReadOnlyMemory<byte>, bool) Run(in ReadOnlyMemory<byte> inputData, IReleaseSpec releaseSpec) | |||
{ | |||
return (inputData, true); | |||
return (inputData.ToArray(), true); |
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 enturely sure why, but IdentityPrecompile isn't really used so shouldn't really matter
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.
Also would it be better to be bool TryRun(in ReadOnlyMemory<byte> inputData, IReleaseSpec releaseSpec, out ReadOnlyMemory<byte> result)
?
More of a break if another chain has their own precompiles? (Don't know if they do) |
huh why? I am askung about just changing interface, |
I mean if any existing extenal precompiles/plugin as they would need to change their signiture to upgrade? |
Would be a better signiture though :) |
I don't think there are any, and if yes this is trivial change |
Changes
Types of changes
What types of changes does your code introduce?
Testing
Requires testing