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

Decouple calculate fee from Wallet #2354

Closed
wants to merge 3 commits into from

Conversation

shargon
Copy link
Member

@shargon shargon commented Feb 19, 2021

Close #2352

@@ -347,79 +346,12 @@ private Transaction MakeTransaction(DataCache snapshot, byte[] script, Signer[]
tx.SystemFee = engine.GasConsumed;
}

tx.NetworkFee = CalculateNetworkFee(snapshot, tx);
tx.NetworkFee = CalculateNetworkFee(snapshot, tx, ProtocolSettings, (a) => GetAccount(a)?.Contract?.Script);
Copy link
Contributor

@Qiao-Jin Qiao-Jin Feb 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems we still need to rely on Wallet for func CalculateNetworkFee

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use this method if you have a dictionary

Copy link
Member

@vncoelho vncoelho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.
It opens more possibilities, in my opnion.

@vncoelho
Copy link
Member

vncoelho commented Feb 19, 2021

@shargon, my idea was that with this change we would be able to, in the future, add a new call on neo-modules RPCServer to make this calculation generic as a RPC call.

However, we need to discuss if this would be a good practice.
One thing is to create the script of a transaction with InvokeFunction.
Another thing is to really pass verificationScripts beforehand.
In my opinion, there is not much problem because, anyway, seed nodes will have it in advance of consensus.

@superboyiii
Copy link
Member

@erikzhang Merge?

@cschuchardt88
Copy link
Member

@shargon Wasn't this fixed already?

@Jim8y Jim8y added the Need Active Pr will be closed after one week if no new activity. label Feb 12, 2024
@Jim8y
Copy link
Contributor

Jim8y commented Feb 18, 2024

Close as inactive

@Jim8y Jim8y closed this Feb 18, 2024
@shargon
Copy link
Member Author

shargon commented Feb 18, 2024

I want to do this, it doesn't hurt I think

@shargon shargon reopened this Feb 18, 2024
@Jim8y
Copy link
Contributor

Jim8y commented Feb 18, 2024

Then please update. I am not against any pr, if you update it, we can finish it.

@shargon
Copy link
Member Author

shargon commented Feb 18, 2024

Moved to #3147

@shargon shargon deleted the decouple-calculate-fee branch February 18, 2024 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Need Active Pr will be closed after one week if no new activity. need update
Projects
None yet
7 participants