From 02c34367bf38fc93290b99637774f634deb0aaad Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Thu, 12 Dec 2019 19:19:28 -0500 Subject: [PATCH] src/wallet/wallet.cpp upstream changes --- src/wallet/wallet.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 41aa9eabe..2ae98fbe9 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1681,7 +1681,7 @@ bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pbl for (size_t i = 0; i < tx.vin.size(); i++) { uint256 hash; CTransaction txin; CTxDestination address; - if ( GetTransaction(tx.vin[i].prevout.hash,txin,hash,false) && ExtractDestination(txin.vout[tx.vin[i].prevout.n].scriptPubKey, address) ) + if ( myGetTransaction(tx.vin[i].prevout.hash,txin,hash) && ExtractDestination(txin.vout[tx.vin[i].prevout.n].scriptPubKey, address) ) { if ( CBitcoinAddress(address).ToString() == NotaryAddress ) numvinIsOurs++; @@ -3651,9 +3651,13 @@ bool CWallet::CreateTransaction(const vector& vecSend, CWalletTx& wt wtxNew.fTimeReceivedIsTxTime = true; wtxNew.BindWallet(this); int nextBlockHeight = chainActive.Height() + 1; - CMutableTransaction txNew = CreateNewContextualCMutableTransaction( - Params().GetConsensus(), nextBlockHeight); + CMutableTransaction txNew = CreateNewContextualCMutableTransaction(Params().GetConsensus(), nextBlockHeight); + + //if ((uint32_t)chainActive.LastTip()->nTime < ASSETCHAINS_STAKED_HF_TIMESTAMP) + if ( !komodo_hardfork_active((uint32_t)chainActive.LastTip()->nTime) ) txNew.nLockTime = (uint32_t)chainActive.LastTip()->nTime + 1; // set to a time close to now + else + txNew.nLockTime = (uint32_t)chainActive.Tip()->GetMedianTimePast(); // Activates after Overwinter network upgrade if (NetworkUpgradeActive(nextBlockHeight, Params().GetConsensus(), Consensus::UPGRADE_OVERWINTER)) {