src/wallet/wallet.cpp upstream changes
This commit is contained in:
@@ -1681,7 +1681,7 @@ bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pbl
|
|||||||
for (size_t i = 0; i < tx.vin.size(); i++)
|
for (size_t i = 0; i < tx.vin.size(); i++)
|
||||||
{
|
{
|
||||||
uint256 hash; CTransaction txin; CTxDestination address;
|
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 )
|
if ( CBitcoinAddress(address).ToString() == NotaryAddress )
|
||||||
numvinIsOurs++;
|
numvinIsOurs++;
|
||||||
@@ -3651,9 +3651,13 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
|
|||||||
wtxNew.fTimeReceivedIsTxTime = true;
|
wtxNew.fTimeReceivedIsTxTime = true;
|
||||||
wtxNew.BindWallet(this);
|
wtxNew.BindWallet(this);
|
||||||
int nextBlockHeight = chainActive.Height() + 1;
|
int nextBlockHeight = chainActive.Height() + 1;
|
||||||
CMutableTransaction txNew = CreateNewContextualCMutableTransaction(
|
CMutableTransaction txNew = CreateNewContextualCMutableTransaction(Params().GetConsensus(), nextBlockHeight);
|
||||||
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
|
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
|
// Activates after Overwinter network upgrade
|
||||||
if (NetworkUpgradeActive(nextBlockHeight, Params().GetConsensus(), Consensus::UPGRADE_OVERWINTER)) {
|
if (NetworkUpgradeActive(nextBlockHeight, Params().GetConsensus(), Consensus::UPGRADE_OVERWINTER)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user