-
Notifications
You must be signed in to change notification settings - Fork 36.2k
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
Remove CMerkleTx #16451
Remove CMerkleTx #16451
Conversation
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.
Just to clarify: When I open+close an "old" wallet file, this will overwrite all merkle txs with zeros? If yes, would it be safe to open such a file with the older version of Bitcoin Core?
src/wallet/wallet.h
Outdated
@@ -365,82 +365,24 @@ struct COutputEntry | |||
int vout; | |||
}; | |||
|
|||
/** A transaction with a merkle branch linking it to the block chain. */ | |||
/** Legacy class used for deserializing vtxPrev for backwards compatibility **/ |
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.
Could add the commit or wallet version where this was changed?
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.
I've expanded the comment here
ADD_SERIALIZE_METHODS; | ||
|
||
template <typename Stream, typename Operation> | ||
inline void SerializationOp(Stream& s, Operation ser_action) { | ||
CTransactionRef tx; | ||
uint256 hashBlock; | ||
int nIndex; |
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.
Would this write uninitialized memory to the wallet file?
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.
No CMerkleTx
object is ever serialized.
I could go even further in this PR and remove the CMerkleTx
object entirely. Let me add a commit to see what that looks like.
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.
Yeah, I am interested in seeing that commit. That probably means you can get rid of the static_cast<const CMerkleTx&>(*this)
that happens in the serialization of CWalletTx
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.
static_cast<const CMerkleTx&>(*this)
Oh, that probably means that serialization is called, so I'd like to re-raise my previous question of uninitialized memory.
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.
That probably means you can get rid of the static_cast<const CMerkleTx&>(*this) that happens in the serialization of CWalletTx
Huh? This PR already does get rid of the static_cast<const CMerkleTx&>(*this)
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.
No CMerkleTx object is ever serialized.
Right, the vector is always empty. You could add assert(ser_action.ForRead())
. But the following removes the serialization support so maybe not worth it?
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.
I like the assert
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.
But the following removes the serialization support so maybe not worth it?
I agree (if we decide to keep the second commit)
Concept ACK |
No. When opening the old file, the CWalletTx deserialization logic will deserialize the merkle txs into a locally scoped That behaviour should be unchanged by this PR. |
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.
Concept ACK. Light code review, build, all tests pass locally.
Concept ACK, should go before #15931 as it lets me remove one commit |
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
c3a4d16
to
f7fe30c
Compare
src/wallet/wallet.h
Outdated
READWRITE(hashBlock); | ||
READWRITE(vMerkleBranch); | ||
READWRITE(nIndex); | ||
s << tx << hashBlock << vMerkleBranch << nIndex; |
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.
You're invoking the serialization operators inside an Unserialize function. I suspect you mean to call the >>
ones instead.
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.
gah. Thanks. Fixed.
f7fe30c
to
82ed04c
Compare
I've added a second commit that removes the Let me know if you think that second commit is useful. I'm happy to keep it or leave it. |
IMO, messing with this serialization code is not an improvement. It makes the PR more longer and more confusing than it needs to be and now repeats the I'd suggest leave the inheritance untouched, leave the serialization untouched, getting rid of the comment explaining serialization workarounds, and just move all the CMerkleTx methods to CWalletTx, leaving CMerkleTx as a simple struct with a serialization operator. |
82ed04c
to
fad5dec
Compare
Thanks for reviewing @ryanofsky . I prefer having all the I'm happy to keep this PR as it is with two commits, reduce to just the first commit, or reduce further as you've suggested (put I'd probably add some comments to explain why we have a base class for |
PR size isn't the main issue. The main thing I don't like is that READWRITE(tx, hashBlock, vMerkleBranch, nIndex) logic is now repeated in 3 places, rewritten 3 slightly different ways, when it only needs to live in one place. The current serialization seems fine and little seems to be gained by blowing it up, since either way you have to keep the CMerkleTx class. The difference is that with my suggestion, CMerkleTx is something normal: a straightforward struct with a serialization operator. While with the current commits, CMerkleTx turns into this weird duplicative dangling thing requiring explanations from ancient history. I also don't understand the division between the two commits. First a "Remove CMerkleTx" commit that doesn't actually remove it, then a "tidy up" commit with no description that changes more random things? So I don't get why a simple MOVEONLY commit that just moves all CMerkleTx methods except SerializationOp to CWalletTx isn't the obvious choice here. But I'm mostly just perplexed by the choice. If you actually think the changes here are great and make sense then please keep them! |
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.
Concept ACK.
First a "Remove CMerkleTx" commit that doesn't actually remove it
I was going to say the same. BTW nit, add wallet prefix to commit message.
@ryanofsky suggestion to keep CMerkleTx
just for serialization/unserialization make the code more straightforward and easy to understand than the last commit, IMO.
Otherwise my comment below has a suggestion to actually drop CMerkleTx
, but I think with Russ suggestion for now.
ADD_SERIALIZE_METHODS; | ||
|
||
template <typename Stream, typename Operation> | ||
inline void SerializationOp(Stream& s, Operation ser_action) { | ||
CTransactionRef tx; | ||
uint256 hashBlock; | ||
int nIndex; |
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.
No CMerkleTx object is ever serialized.
Right, the vector is always empty. You could add assert(ser_action.ForRead())
. But the following removes the serialization support so maybe not worth it?
CWalletTx(const CWallet* pwalletIn, CTransactionRef arg) : CMerkleTx(std::move(arg)) | ||
CWalletTx(const CWallet* pwalletIn, CTransactionRef arg) | ||
: tx(std::move(arg)), | ||
hashBlock(uint256()), |
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.
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.
That is neither in the style-guide nor in clang-format
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.
None is AFAICT.
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.
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.
I actually prefer your style @promag , but I'll keep this as is for now to not invalidate your review. If I need to update the PR again I'll swap to your style.
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.
This code is fine. Please do not give formatting comments about preferences, that are not in the code style or developer notes,
std::vector<CMerkleTx> vUnused; //!< Used to be vtxPrev | ||
s << vUnused << mapValueCopy << vOrderForm << fTimeReceivedIsTxTime << nTimeReceived << fFromMe << fSpent; | ||
std::vector<char> dummy_vector1; //!< Used to be vMerkleBranch | ||
std::vector<char> dummy_vector2; //!< Used to be vtxPrev |
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.
Just to be sure, this means that an empty vector<char>
serialized is compatible with the unserialization of vector<CMerkleTx>
?
Edit: nervermind, went and see Unserialize_impl
for vectors.
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.
Correct. Empty vector<>
s get serialized to a single 0 byte (the compactSize of an empty vector)
std::vector<CMerkleTx> vUnused; //!< Used to be vtxPrev | ||
s >> vUnused >> mapValue >> vOrderForm >> fTimeReceivedIsTxTime >> nTimeReceived >> fFromMe >> fSpent; | ||
std::vector<uint256> dummy_vector1; //!< Used to be vMerkleBranch | ||
std::vector<CMerkleTx> dummy_vector2; //!< Used to be vtxPrev |
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.
Could remove this and inline CMerkleTx::Unserialize
, see:
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -365,26 +365,6 @@ struct COutputEntry
int vout;
};
-/** Legacy class used for deserializing vtxPrev for backwards compatibility.
- * vtxPrev was removed in commit 93a18a3650292afbb441a47d1fa1b94aeb0164e3,
- * but old wallet.dat files may still contain vtxPrev vectors of CMerkleTxs.
- * These need to get deserialized for field alignment when deserializing
- * a CWalletTx, but the deserialized values are discarded.**/
-class CMerkleTx
-{
-public:
- template<typename Stream>
- void Unserialize(Stream& s)
- {
- CTransactionRef tx;
- uint256 hashBlock;
- std::vector<uint256> vMerkleBranch;
- int nIndex;
-
- s >> tx >> hashBlock >> vMerkleBranch >> nIndex;
- }
-};
-
//Get the marginal bytes of spending the specified output
int CalculateMaximumSignedInputSize(const CTxOut& txout, const CWallet* pwallet, bool use_max_sig = false);
@@ -512,9 +492,17 @@ public:
Init(nullptr);
std::vector<uint256> dummy_vector1; //!< Used to be vMerkleBranch
- std::vector<CMerkleTx> dummy_vector2; //!< Used to be vtxPrev
char dummy_char; //! Used to be fSpent
- s >> tx >> hashBlock >> dummy_vector1 >> nIndex >> dummy_vector2 >> mapValue >> vOrderForm >> fTimeReceivedIsTxTime >> nTimeReceived >> fFromMe >> dummy_char;
+ s >> tx >> hashBlock >> dummy_vector1 >> nIndex;
+ {
+ CTransactionRef tx;
+ uint256 hashBlock;
+ std::vector<uint256> vMerkleBranch;
+ int nIndex;
+
+ s >> tx >> hashBlock >> vMerkleBranch >> nIndex; //!< Used to be vtxPrev
+ }
+ s >> mapValue >> vOrderForm >> fTimeReceivedIsTxTime >> nTimeReceived >> fFromMe >> dummy_char;
ReadOrderPos(nOrderPos, mapValue);
nTimeSmart = mapValue.count("timesmart") ? (unsigned int)atoi64(mapValue["timesmart"]) : 0;
And if you do so then I'd squash now that CMerkleTx
is actually removed.
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.
This isn't equivalent. vtxPrev
was a vector, so:
- there can be multiple
CMerkleTx
objects serialized - the serialization is preceded with a compactSize
I would like to remove CMerkleTx
entirely, but implementing the low-lever deserialization logic for a vector of CMerkleTx
s here seems like it could be easy to introduce an inconsistency (potentially causing wallets to get corrupted) and it seems wrong to be adding low-level deserialization code to this file.
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.
Ah sorry.. You could read compact size, then loop to read dummy values but really not worth it. You can resolve this.
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.
You could read compact size, then loop to read dummy values but really not worth it.
Exactly. Seems error-prone and redundant.
I much prefer that after this PR I can look at a single function to see how a wallet tx will be serialized or deserialized, rather than seeing the object being Longer term, I think it might make sense to move all of the serialization logic for the wallet objects to walletdb.{cpp,h}. There are already some objects that are defined in that header file with (de)serialization functions and deserialization fixups in
I'll try to improve the commit structure/messages.
I can certainly do that. The main aim of this PR is to move the |
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.
ACK fad5dec
} | ||
|
||
template<typename Stream> | ||
void Unserialize(Stream& s) | ||
{ | ||
Init(nullptr); | ||
char fSpent; |
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.
in commit fad5dec:
I think this function does not need to be changed and can be kept as is.
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.
See #16451 (comment). I'll remove everything after the first commit if others agree.
std::vector<CMerkleTx> vUnused; //!< Used to be vtxPrev | ||
s << vUnused << mapValueCopy << vOrderForm << fTimeReceivedIsTxTime << nTimeReceived << fFromMe << fSpent; | ||
std::vector<char> dummy_vector1; //!< Used to be vMerkleBranch | ||
std::vector<char> dummy_vector2; //!< Used to be vtxPrev |
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.
in commit fad5dec:
I think you can keep everything in this function as is (except changing the type of the vector). This should simplify review.
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.
See #16451 (comment). I'll remove everything after the first commit if others agree.
fad5dec
to
458e43e
Compare
I've resplit the changes into three commits:
Only (1) is needed. I think (2) and (3) are nice-to-haves, but can split them into a separate PR if others disagree. |
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.
ACK 458e43e, refactor reviewed, confirmed moved lines. I think 2nd and 3rd commits are fine.
std::vector<CMerkleTx> vUnused; //!< Used to be vtxPrev | ||
s >> vUnused >> mapValue >> vOrderForm >> fTimeReceivedIsTxTime >> nTimeReceived >> fFromMe >> fSpent; | ||
std::vector<uint256> dummy_vector1; //!< Used to be vMerkleBranch | ||
std::vector<CMerkleTx> dummy_vector2; //!< Used to be vtxPrev |
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.
Ah sorry.. You could read compact size, then loop to read dummy values but really not worth it. You can resolve this.
CWalletTx(const CWallet* pwalletIn, CTransactionRef arg) : CMerkleTx(std::move(arg)) | ||
CWalletTx(const CWallet* pwalletIn, CTransactionRef arg) | ||
: tx(std::move(arg)), | ||
hashBlock(uint256()), |
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.
None is AFAICT.
ADD_SERIALIZE_METHODS; | ||
|
||
template <typename Stream, typename Operation> | ||
inline void SerializationOp(Stream& s, Operation ser_action) { | ||
CTransactionRef tx; |
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.
Just noting that it's not really necessary to make these local variables since that unserialized CMerkleTx
are discarded anyway. I guess you are doing this to underline the idea, so maybe also add a comment here?
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.
Yeah, it's equivalent, but I think the intent is clearer this way. Why have data members in a class where any instantiated objects are just going to be thrown away?
I don't think an additional comment is necessary here - the code along with the comment on the CMerkleTx
class should be clear enough.
FWIW, it's possible to do something like Not sure that's an improvement though. |
Thanks! I've implemented that here: jnewbery@efcdb2e, which removes |
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.
Light ACK 458e43e, code review of the 3 new commits, build with no warnings, all tests pass.
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.
I've reviewed the code and it looks good 458e43e
I have no strong opinion on whether the second and third commits are kept or not, I think the PR is good as-is
CMerkleTx only exists as a base class for CWalletTx and for wallet file serialization/deserialization. Move CMerkleTx methods into CWalletTx, but leave class hierarchy and serialization logic in place.
Removes CMerkleTx as a base class for CWalletTx. Serialization logic is moved from CMerkleTx to CWalletTx.
CMerkleTx is only used for deserialization of old wallet files. Remove the serialization logic, and tidy up CWalletTx serialization logic.
458e43e
to
05b56d1
Compare
rebased |
ACK 05b56d1. Looks good to me.
Having an intermediate base class just for serialization/deserialization is just silly and I'm all for getting rid of that in this PR. And I think flattening the class hierarchy when possible is great in general, this simplifies understanding of the code. Changing it to a separate "legacy class" solely for de-serializing makes a lot of sense to me, it's easier to review for correctness/compatibility and also self-documenting, more so than |
05b56d1 [wallet] Remove CMerkleTx serialization logic (John Newbery) 783a76f [wallet] Flatten CWalletTx class hierarchy (John Newbery) b3a9d17 [wallet] Move CMerkleTx functions into CWalletTx (John Newbery) Pull request description: CMerkleTx is only used as a base class for CWalletTx. It was previously also used for vtxPrev which was removed in 93a18a3. This PR moves all of the CMerkleTx members and logic into CWalletTx. The CMerkleTx class is kept for deserialization and serialization of old wallet files. This makes the refactor in #15931 cleaner. ACKs for top commit: laanwj: ACK 05b56d1. Looks good to me. Tree-SHA512: 3d3a0069ebb536b12a328f1261e7dc55158a71088d445ae4b4ace4142c432dc296f58c8183b1922e54a60b8cc77e9d17c3dce7478294cd68693594baacf2bab3
05b56d1 [wallet] Remove CMerkleTx serialization logic (John Newbery) 783a76f [wallet] Flatten CWalletTx class hierarchy (John Newbery) b3a9d17 [wallet] Move CMerkleTx functions into CWalletTx (John Newbery) Pull request description: CMerkleTx is only used as a base class for CWalletTx. It was previously also used for vtxPrev which was removed in 93a18a3. This PR moves all of the CMerkleTx members and logic into CWalletTx. The CMerkleTx class is kept for deserialization and serialization of old wallet files. This makes the refactor in bitcoin#15931 cleaner. ACKs for top commit: laanwj: ACK 05b56d1. Looks good to me. Tree-SHA512: 3d3a0069ebb536b12a328f1261e7dc55158a71088d445ae4b4ace4142c432dc296f58c8183b1922e54a60b8cc77e9d17c3dce7478294cd68693594baacf2bab3
… refactor 7e1aa0d Adapt GUI to the latest CTransactionRef migration changes. (furszy) 362366b BugFix: sapling operation, only set the final transaction at the end of the process. (furszy) 28aec49 [MOVE-ONLY] Wallet, moving CWalletTx and it's related classes above CWallet class definition. (furszy) 19d5338 [wallet] Remove CMerkleTx serialization logic (John Newbery) 77d1ce8 [wallet] Flatten CWalletTx class hierarchy (John Newbery) 9dd431f wallet: remove now unused CWalletTx default constructor (furszy) c08824f Wallet: mapWallet, moving away from map bracket operator usage. (furszy) 3e836f9 Decouple CWalletTx serialization in ser & unser methods. (furszy) 7073a78 [wallet] Move CMerkleTx functions into CWalletTx CMerkleTx only exists as a base class for CWalletTx and for wallet file serialization/deserialization. Move CMerkleTx methods into CWalletTx, but leave class hierarchy and serialization logic in place. (John Newbery) 03a4ebe Wallet: Moved CreateTransaction and CommitTransaction to use CTransactionRef (furszy) da8e05c Refactor: Migrated functions using CTransaction to CTransactionRef inside the wallet and validation areas. (furszy) Pull request description: Have grouped a good number of improvements and updates over the wallet area, need all of them for a subsequent, probably larger, PR that i'm cooking: 1) Migrated several functions using `CTransaction` to `CTransactionRef`. 2) Moved `CreateTransaction` and `CommitTransaction` methods signatures from using `CWalletTx` to use `CTransactionRef`. 3) Refactored every `mapWallet` bracket operator usage. 4) Removed `CWalletTx` default constructor (Thanks to (2) and (3)) 5) Decouple `CWalletTx` templated serialization in specific ser & unser functions. 6) Solved a small bug inside the sapling operation process, which was setting the final transaction before finalizing successfully. 7) Move-only, moved the `CWalletTx` and it's related classes definition above the `CWallet` class definition (required groundwork for a future PR). 8) Adapted upstream bitcoin#16451 to our sources. ACKs for top commit: random-zebra: ACK 7e1aa0d Fuzzbawls: ACK 7e1aa0d Tree-SHA512: fd993b2d9e1fc52ba1f11119ed39ed87221eee14fe79396e2392391d6d0a6b775ec4d617d1772f6ff21ddfefc9897521c5b30e8f494b7ce1b1069926d8ea9179
05b56d1 [wallet] Remove CMerkleTx serialization logic (John Newbery) 783a76f [wallet] Flatten CWalletTx class hierarchy (John Newbery) b3a9d17 [wallet] Move CMerkleTx functions into CWalletTx (John Newbery) Pull request description: CMerkleTx is only used as a base class for CWalletTx. It was previously also used for vtxPrev which was removed in 93a18a3. This PR moves all of the CMerkleTx members and logic into CWalletTx. The CMerkleTx class is kept for deserialization and serialization of old wallet files. This makes the refactor in bitcoin#15931 cleaner. ACKs for top commit: laanwj: ACK 05b56d1. Looks good to me. Tree-SHA512: 3d3a0069ebb536b12a328f1261e7dc55158a71088d445ae4b4ace4142c432dc296f58c8183b1922e54a60b8cc77e9d17c3dce7478294cd68693594baacf2bab3
05b56d1 [wallet] Remove CMerkleTx serialization logic (John Newbery) 783a76f [wallet] Flatten CWalletTx class hierarchy (John Newbery) b3a9d17 [wallet] Move CMerkleTx functions into CWalletTx (John Newbery) Pull request description: CMerkleTx is only used as a base class for CWalletTx. It was previously also used for vtxPrev which was removed in 93a18a3. This PR moves all of the CMerkleTx members and logic into CWalletTx. The CMerkleTx class is kept for deserialization and serialization of old wallet files. This makes the refactor in bitcoin#15931 cleaner. ACKs for top commit: laanwj: ACK 05b56d1. Looks good to me. Tree-SHA512: 3d3a0069ebb536b12a328f1261e7dc55158a71088d445ae4b4ace4142c432dc296f58c8183b1922e54a60b8cc77e9d17c3dce7478294cd68693594baacf2bab3
05b56d1 [wallet] Remove CMerkleTx serialization logic (John Newbery) 783a76f [wallet] Flatten CWalletTx class hierarchy (John Newbery) b3a9d17 [wallet] Move CMerkleTx functions into CWalletTx (John Newbery) Pull request description: CMerkleTx is only used as a base class for CWalletTx. It was previously also used for vtxPrev which was removed in 93a18a3. This PR moves all of the CMerkleTx members and logic into CWalletTx. The CMerkleTx class is kept for deserialization and serialization of old wallet files. This makes the refactor in bitcoin#15931 cleaner. ACKs for top commit: laanwj: ACK 05b56d1. Looks good to me. Tree-SHA512: 3d3a0069ebb536b12a328f1261e7dc55158a71088d445ae4b4ace4142c432dc296f58c8183b1922e54a60b8cc77e9d17c3dce7478294cd68693594baacf2bab3
05b56d1 [wallet] Remove CMerkleTx serialization logic (John Newbery) 783a76f [wallet] Flatten CWalletTx class hierarchy (John Newbery) b3a9d17 [wallet] Move CMerkleTx functions into CWalletTx (John Newbery) Pull request description: CMerkleTx is only used as a base class for CWalletTx. It was previously also used for vtxPrev which was removed in 93a18a3. This PR moves all of the CMerkleTx members and logic into CWalletTx. The CMerkleTx class is kept for deserialization and serialization of old wallet files. This makes the refactor in bitcoin#15931 cleaner. ACKs for top commit: laanwj: ACK 05b56d1. Looks good to me. Tree-SHA512: 3d3a0069ebb536b12a328f1261e7dc55158a71088d445ae4b4ace4142c432dc296f58c8183b1922e54a60b8cc77e9d17c3dce7478294cd68693594baacf2bab3
05b56d1 [wallet] Remove CMerkleTx serialization logic (John Newbery) 783a76f [wallet] Flatten CWalletTx class hierarchy (John Newbery) b3a9d17 [wallet] Move CMerkleTx functions into CWalletTx (John Newbery) Pull request description: CMerkleTx is only used as a base class for CWalletTx. It was previously also used for vtxPrev which was removed in 93a18a3. This PR moves all of the CMerkleTx members and logic into CWalletTx. The CMerkleTx class is kept for deserialization and serialization of old wallet files. This makes the refactor in bitcoin#15931 cleaner. ACKs for top commit: laanwj: ACK 05b56d1. Looks good to me. Tree-SHA512: 3d3a0069ebb536b12a328f1261e7dc55158a71088d445ae4b4ace4142c432dc296f58c8183b1922e54a60b8cc77e9d17c3dce7478294cd68693594baacf2bab3
05b56d1 [wallet] Remove CMerkleTx serialization logic (John Newbery) 783a76f [wallet] Flatten CWalletTx class hierarchy (John Newbery) b3a9d17 [wallet] Move CMerkleTx functions into CWalletTx (John Newbery) Pull request description: CMerkleTx is only used as a base class for CWalletTx. It was previously also used for vtxPrev which was removed in 93a18a3. This PR moves all of the CMerkleTx members and logic into CWalletTx. The CMerkleTx class is kept for deserialization and serialization of old wallet files. This makes the refactor in bitcoin#15931 cleaner. ACKs for top commit: laanwj: ACK 05b56d1. Looks good to me. Tree-SHA512: 3d3a0069ebb536b12a328f1261e7dc55158a71088d445ae4b4ace4142c432dc296f58c8183b1922e54a60b8cc77e9d17c3dce7478294cd68693594baacf2bab3
05b56d1 [wallet] Remove CMerkleTx serialization logic (John Newbery) 783a76f [wallet] Flatten CWalletTx class hierarchy (John Newbery) b3a9d17 [wallet] Move CMerkleTx functions into CWalletTx (John Newbery) Pull request description: CMerkleTx is only used as a base class for CWalletTx. It was previously also used for vtxPrev which was removed in 93a18a3. This PR moves all of the CMerkleTx members and logic into CWalletTx. The CMerkleTx class is kept for deserialization and serialization of old wallet files. This makes the refactor in bitcoin#15931 cleaner. ACKs for top commit: laanwj: ACK 05b56d1. Looks good to me. Tree-SHA512: 3d3a0069ebb536b12a328f1261e7dc55158a71088d445ae4b4ace4142c432dc296f58c8183b1922e54a60b8cc77e9d17c3dce7478294cd68693594baacf2bab3
CMerkleTx is only used as a base class for
CWalletTx. It was previously also used for vtxPrev which
was removed in 93a18a3.
This PR moves all of the CMerkleTx members and logic
into CWalletTx. The CMerkleTx class is kept for deserialization
and serialization of old wallet files.
This makes the refactor in #15931 cleaner.