refactor: don't hardcode the transaction version#5864
refactor: don't hardcode the transaction version#5864PastaPastaPasta merged 6 commits intodashpay:developfrom
Conversation
src/primitives/transaction.h
Outdated
|
|
||
| bool IsSpecialTxVersion() const | ||
| { | ||
| return nVersion >= 3; |
There was a problem hiding this comment.
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.
LGTM, seems as all my suggestions are included
|
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 |
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.