-
Notifications
You must be signed in to change notification settings - Fork 1.2k
refactor: don't hardcode the transaction version #5864
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
refactor: don't hardcode the transaction version #5864
Conversation
src/primitives/transaction.h
Outdated
|
|
||
| bool IsSpecialTxVersion() const | ||
| { | ||
| return nVersion >= 3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE: it's safe to go from == 3 to >=3 because the latter is used in ContextualCheckTransaction
I tried to re-start CI; everytime this test fails, maybe there's some newly introduced issue? I will try to re-start one more time The last failure: https://gitlab.com/dashpay/dash/-/jobs/6135684689 |
I don't know why it fails, but I have seen it failing in every PR I opened (always in the same job linux64_tsan-test) |
|
CI failure is unrelated, should be fixed by #5867 |
|
Hi @panleone; do you intend for this PR to move forward? I would see this likely merged soon with review addressed |
70f4f2c to
5d7fd89
Compare
Completely forgot about this PR... reviews tackled but I do not have the time to make the history clean so I left 4 extra commits where I applied knst's patches |
knst
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, seems as all my suggestions are included
UdjinM6
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
|
This pull request has conflicts, please rebase. |
|
Hi @panleone; Sorry, but this PR needs to be rebased, it has conflicts with develop. |
5d7fd89 to
fda6803
Compare
fda6803 to
8b6c96d
Compare
Instead of hardcoding the tx version
should be good now |
knst
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 8b6c96d
UdjinM6
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, utACK
Issue being fixed or feature implemented
Refactor extracted from #5860. Even if that PR should not need anymore this commit (since it has been found a better way to activate dip143), I think It's still a worthy refactor
What was done?
Introduce
tx.IsSpecialTxVersion()in place oftx.nVersion == 3,tx.nVersion >= 3and
tx.HasExtraPayloadField()in place oftx.nVersion == 3 && tx.nType != TRANSACTION_NORMALHow Has This Been Tested?
Breaking Changes
Checklist:
Go over all the following points, and put an
xin all the boxes that apply.