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

tx template fee sorting appears reversed #1630

Closed
iamsmooth opened this issue Jan 25, 2017 · 3 comments
Closed

tx template fee sorting appears reversed #1630

iamsmooth opened this issue Jan 25, 2017 · 3 comments

Comments

@iamsmooth
Copy link
Contributor

iamsmooth commented Jan 25, 2017

https://github.com/monero-project/monero/blob/master/src/cryptonote_core/tx_pool.cpp#L256
https://github.com/monero-project/monero/blob/master/src/cryptonote_core/tx_pool.h#L65

^ Looking at this code it appears to me that transactions with the higher number of bytes per fee paid (i.e. lower fee per byte) would be sorted before (and added to the template before) those with lower bytes per fee.

I see several blocks mined which appear to confirm this behavior:

https://xmrchain.net/block/1231370
https://xmrchain.net/block/1231373

Suggested fix: either invert the current bytes/fee calculation or reverse the sort order for the std::set

@iamsmooth
Copy link
Contributor Author

There's a fix over here: xnbya@56499f5

@iamsmooth
Copy link
Contributor Author

#1631

@iamsmooth
Copy link
Contributor Author

has been fixed

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

1 participant