Skip to content

[RPC] Correct getblockstats fee calculation#990

Merged
codeofalltrades merged 1 commit intoVeil-Project:masterfrom
Zannick:fee
Feb 19, 2022
Merged

[RPC] Correct getblockstats fee calculation#990
codeofalltrades merged 1 commit intoVeil-Project:masterfrom
Zannick:fee

Conversation

@Zannick
Copy link
Collaborator

@Zannick Zannick commented Feb 13, 2022

Current implementation always performs a subtraction ins - outs to calculate fee, which is only correct for basecoin-to-basecoin, and results in zerocoin spends appearing as the fee. CT/RingCT and Zerocoin Minting/Spending include a ct_fee output that we can use (ZC spends have a ct_fee of 0 but at least that lets us skip the subtraction).

Otherwise fall back to subtraction (mainly basecoin-to-basecoin) or skipping.
@Zannick Zannick added Component: RPC Related to the console commands themselves. Tag: Waiting For Code Review Waiting for code review from a core developer labels Feb 13, 2022
@Zannick Zannick self-assigned this Feb 13, 2022
@WetOne
Copy link
Collaborator

WetOne commented Feb 18, 2022

utACK 95c4740

Copy link

@minerminer4949 minerminer4949 left a comment

Choose a reason for hiding this comment

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

ACK 95c4740

Copy link
Collaborator

@codeofalltrades codeofalltrades left a comment

Choose a reason for hiding this comment

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

ACK 95c4740

@codeofalltrades codeofalltrades removed the Tag: Waiting For Code Review Waiting for code review from a core developer label Feb 19, 2022
@codeofalltrades codeofalltrades merged commit ea3bf69 into Veil-Project:master Feb 19, 2022
@Zannick Zannick deleted the fee branch March 20, 2022 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: RPC Related to the console commands themselves.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants