rpcsrv: fix RPC error codes proposal compatibility #3360
Merged
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.
Problem
Implementation doesn't match neo-project/proposals#156 wrt mempool-related transaction fee check on submitting new transaction to the node. Thanks to @carpawell for pointing that out.
Solution
Fix the implementation.
@roman-khimov, I'd like to highlight: whereas it's quite easy to fix this compatibility problem on our side, C# node has the same divergence from the standard and requires more changes to fix it:
TransactionVerificationContext.CheckTransaction
should be adjusted to return some new special error, this error should be detached fromVerifyResult.InsufficientFunds
and ported to other components (ref. https://github.com/neo-project/neo/blob/b05501af882a0d1f2a1a7841c6ddc4d0504e5fc1/src/Neo/Network/P2P/Payloads/Transaction.cs#L368).I may port it to C# or create an issue about it, what would we prefer?