forked from dashpay/dash
-
Notifications
You must be signed in to change notification settings - Fork 716
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #2044: [Wallet] Making CWalletTx store TransactionRef.
652981a Make CWalletTx store a CTransactionRef (furszy) 53746b9 Transaction primitive, decouple serialization process into its own method. (furszy) 008f38e CTxIn primitive, remove unused prevPubKey member. (furszy) Pull request description: Instead of inheriting from `CTransaction`, now `CWalletTx` will store it as member. Another step forward over the transaction complete immutability goal. An adaptation of c3f5673 with further needed changes, essentially: > it makes it actually fully immutable and never modifies any of its elements (apart from wit) after construction. > > To do so, we heavily rely on C++11. CTransaction gets a (CMutableTransaction&&) constructor that efficiently converts a CMutableTransaction into a CTransaction without copying. In addition, CTransaction gets a deserializing constructors. > > One downside is that CWalletTx cannot easily inherent from CTransaction anymore, as CWalletTx needs a way to modify the CTransaction data inside. By turning the superclass into a CTransactionRef field, it can take advantage (not implemented yet) of sharing CTransactions with the mempool. ACKs for top commit: random-zebra: utACK 652981a Fuzzbawls: utACK 652981a Tree-SHA512: bec9fb42de0e9fa2fa98ca0edb750ca0932beb36b0103cdc36f9f4e3dc75f8d9d78dbc1459197e31159e1c6c0dc6a1b47aede426734b8f1e01c474b775264b66
- Loading branch information
Showing
16 changed files
with
289 additions
and
284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.