Skip to content
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

Is the end parameter necessary? #2957

Closed
ProDog opened this issue Nov 10, 2023 · 3 comments
Closed

Is the end parameter necessary? #2957

ProDog opened this issue Nov 10, 2023 · 3 comments

Comments

@ProDog
Copy link
Contributor

ProDog commented Nov 10, 2023

https://github.com/neo-project/neo/blob/6df83952d01b6c9486814f677fe42a2922ce3ee1/src/Neo/SmartContract/Native/NeoToken.cs#L174C4-L174C4

var expectEnd = Ledger.CurrentIndex(snapshot) + 1;
if (expectEnd != end) throw new ArgumentOutOfRangeException(nameof(end));

The end can only be Ledger.CurrentIndex(snapshot) + 1, but it still an external argument at get UnclaimedGas.

https://github.com/neo-project/neo/blob/6df83952d01b6c9486814f677fe42a2922ce3ee1/src/Neo/SmartContract/Native/NeoToken.cs#L337C86-L337C86

@Jim8y
Copy link
Contributor

Jim8y commented Nov 10, 2023

Looks like unnecessary, but i would choose to leave it that way as interface has being used by many others, we can not just change it.

@Jim8y
Copy link
Contributor

Jim8y commented Nov 10, 2023

close this issue since we will not do anything about it.

@Jim8y Jim8y closed this as completed Nov 10, 2023
@roman-khimov
Copy link
Contributor

This was discussed in #2841 and #2900. It's kept for compatibility. We can introduce an additional unclaimedGas/1, but I doubt it's a priority for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants