Browse Source

Update CWalletTx internals

pull/132/head
Duke Leto 6 years ago
parent
commit
4d8750b1ab
  1. 2
      src/komodo_validation015.h
  2. 13
      src/wallet/wallet.h

2
src/komodo_validation015.h

@ -81,7 +81,7 @@ void ImportAddress(CWallet*, const CTxDestination& dest, const std::string& strL
int32_t gettxout_scriptPubKey(int32_t height,uint8_t *scriptPubKey,int32_t maxsize,uint256 txid,int32_t n)
{
static uint256 zero; int32_t i,m; uint8_t *ptr; CTransactionRef tx=0; uint256 hashBlock;
static uint256 zero; int32_t i,m; uint8_t *ptr; CTransactionRef tx = MakeTransactionRef(); uint256 hashBlock;
LOCK(cs_main);
if ( KOMODO_TXINDEX != 0 )
{

13
src/wallet/wallet.h

@ -288,6 +288,7 @@ private:
int GetDepthInMainChainINTERNAL(const CBlockIndex* &pindexRet) const;
public:
CTransactionRef tx;
uint256 hashBlock;
std::vector<uint256> vMerkleBranch;
int nIndex;
@ -298,6 +299,13 @@ public:
CMerkleTx()
{
SetTx(MakeTransactionRef());
Init();
}
explicit CMerkleTx(CTransactionRef arg)
{
SetTx(std::move(arg));
Init();
}
@ -313,6 +321,11 @@ public:
fMerkleVerified = false;
}
void SetTx(CTransactionRef arg)
{
tx = std::move(arg);
}
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>

Loading…
Cancel
Save