Auto merge of #3239 - str4d:sapling-default-tx-version, r=str4d

Update CreateNewContextualCMutableTransaction for Sapling

Part of #3063.
This commit is contained in:
Homu
2018-05-07 12:27:47 -07:00
5 changed files with 70 additions and 20 deletions

View File

@@ -3701,9 +3701,6 @@ UniValue z_sendmany(const UniValue& params, bool fHelp)
if (contextualTx.nVersion == 1 && isShielded) {
contextualTx.nVersion = 2; // Tx format should support vjoinsplits
}
if (NetworkUpgradeActive(nextBlockHeight, Params().GetConsensus(), Consensus::UPGRADE_OVERWINTER)) {
contextualTx.nExpiryHeight = nextBlockHeight + expiryDelta;
}
// Create operation and add to global queue
std::shared_ptr<AsyncRPCQueue> q = getAsyncRPCQueue();
@@ -3902,9 +3899,6 @@ UniValue z_shieldcoinbase(const UniValue& params, bool fHelp)
if (contextualTx.nVersion == 1) {
contextualTx.nVersion = 2; // Tx format should support vjoinsplits
}
if (overwinterActive) {
contextualTx.nExpiryHeight = nextBlockHeight + expiryDelta;
}
// Create operation and add to global queue
std::shared_ptr<AsyncRPCQueue> q = getAsyncRPCQueue();
@@ -4244,9 +4238,6 @@ UniValue z_mergetoaddress(const UniValue& params, bool fHelp)
if (contextualTx.nVersion == 1 && isShielded) {
contextualTx.nVersion = 2; // Tx format should support vjoinsplit
}
if (overwinterActive) {
contextualTx.nExpiryHeight = nextBlockHeight + expiryDelta;
}
// Create operation and add to global queue
std::shared_ptr<AsyncRPCQueue> q = getAsyncRPCQueue();