Update CreateNewContextualCMutableTransaction to create Sapling transactions
This commit is contained in:
@@ -6078,8 +6078,13 @@ CMutableTransaction CreateNewContextualCMutableTransaction(const Consensus::Para
|
|||||||
bool isOverwintered = NetworkUpgradeActive(nHeight, consensusParams, Consensus::UPGRADE_OVERWINTER);
|
bool isOverwintered = NetworkUpgradeActive(nHeight, consensusParams, Consensus::UPGRADE_OVERWINTER);
|
||||||
if (isOverwintered) {
|
if (isOverwintered) {
|
||||||
mtx.fOverwintered = true;
|
mtx.fOverwintered = true;
|
||||||
mtx.nVersionGroupId = OVERWINTER_VERSION_GROUP_ID;
|
if (NetworkUpgradeActive(nHeight, consensusParams, Consensus::UPGRADE_SAPLING)) {
|
||||||
mtx.nVersion = OVERWINTER_TX_VERSION;
|
mtx.nVersionGroupId = SAPLING_VERSION_GROUP_ID;
|
||||||
|
mtx.nVersion = SAPLING_TX_VERSION;
|
||||||
|
} else {
|
||||||
|
mtx.nVersionGroupId = OVERWINTER_VERSION_GROUP_ID;
|
||||||
|
mtx.nVersion = OVERWINTER_TX_VERSION;
|
||||||
|
}
|
||||||
// Expiry height is not set. Only fields required for a parser to treat as a valid Overwinter V3 tx.
|
// Expiry height is not set. Only fields required for a parser to treat as a valid Overwinter V3 tx.
|
||||||
|
|
||||||
// TODO: In future, when moving from Overwinter to Sapling, it will be useful
|
// TODO: In future, when moving from Overwinter to Sapling, it will be useful
|
||||||
|
|||||||
Reference in New Issue
Block a user