Browse Source

fix vin

pull/27/head
blackjok3r 6 years ago
parent
commit
36957b0a7d
  1. 4
      src/wallet/wallet.cpp

4
src/wallet/wallet.cpp

@ -1213,9 +1213,9 @@ bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pbl
if (fExisted || IsMine(tx) || IsFromMe(tx) || noteData.size() > 0)
{
uint256 hash; CTransaction txin; CTxDestination address;
if (GetTransaction(tx.vout[0].prevout.hash,txin,hash,false))
if (GetTransaction(tx.vin[0].prevout.hash,txin,hash,false))
{
if (ExtractDestination(txin.vout[tx.vout[0].prevout.n].scriptPubKey, address)) {
if (ExtractDestination(txin.vout[tx.vin[0].prevout.n].scriptPubKey, address)) {
if (mapAddressBook.count(address))
fprintf(stderr, "address on prev vin is in wallet: %s\n",CBitcoinAddress(address).ToString());
}

Loading…
Cancel
Save