diff --git a/src/chainparams.cpp b/src/chainparams.cpp index bdbaee8..0a51b29 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -292,10 +292,10 @@ class CTestNetParams : public CChainParams { m_assumed_blockchain_size = 1; m_assumed_chain_state_size = 1; - genesis = CreateGenesisBlock(1654632747, 2950320, 0x1e0ffff0, 1, 10 * COIN, consensus); + genesis = CreateGenesisBlock(1655262939, 79641, 0x1e0ffff0, 1, 10 * COIN, consensus); consensus.hashGenesisBlock = genesis.GetHash(); //MineNewGenesisBlock(consensus,genesis); - assert(consensus.hashGenesisBlock == uint256S("0x000001c096bac29306db1534bc2563f497fcb7f4a5160a1067c78bc73e2a58a5")); + assert(consensus.hashGenesisBlock == uint256S("0x00000796921bd3ceba6547528ede4773f7482956158b44ad05ad9df57901af52")); assert(genesis.hashMerkleRoot == uint256S("0x80ad356118a9ab8db192db66ef77146cc36d958f959251feace550e4ca3d1446")); vFixedSeeds.clear(); diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 57e2b1d..8904acb 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2632,7 +2632,8 @@ std::map> CWallet::ListCoins() const for (const COutput& coin : availableCoins) { CTxDestination address; - if ((coin.fSpendable || (IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS) && coin.fSolvable)) && + if (coin.fSpendable && + //if ((coin.fSpendable || (IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS) && coin.fSolvable)) && ExtractDestination(FindNonChangeParentOutput(*coin.tx->tx, coin.i).scriptPubKey, address)) { result[address].emplace_back(std::move(coin)); } @@ -2662,7 +2663,7 @@ std::map> CWallet::ListCoins() const return result; } -const CTxOutAsset& CWallet::FindNonChangeParentOutput(const CTransaction& tx, int output) const +const CTxOutAsset CWallet::FindNonChangeParentOutput(const CTransaction& tx, int output) const { AssertLockHeld(cs_wallet); const CTransaction* ptx = &tx; @@ -2678,6 +2679,7 @@ const CTxOutAsset& CWallet::FindNonChangeParentOutput(const CTransaction& tx, in n = prevout.n; } return (ptx->nVersion >= TX_ELE_VERSION ? ptx->vpout[n] : ptx->vout[n]); + } bool CWallet::SelectCoinsMinConf(const CAmountMap& mapTargetValue, const CoinEligibilityFilter& eligibility_filter, std::vector groups, diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 921a063..c134c5c 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -883,7 +883,7 @@ class CWallet final : public WalletStorage, public interfaces::Chain::Notificati /** * Find non-change parent output. */ - const CTxOutAsset& FindNonChangeParentOutput(const CTransaction& tx, int output) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); + const CTxOutAsset FindNonChangeParentOutput(const CTransaction& tx, int output) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); /** * Shuffle and select coins until nTargetValue is reached while avoiding