Permalink
Browse files

Mempool verification

  • Loading branch information...
1 parent 2115c93 commit 7e15b68ae2081aee3cf4585e9e8bc75939fa14ca @sipa sipa committed Nov 24, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/main.cpp
View
@@ -3559,6 +3559,10 @@ CBlock* CreateNewBlock(CReserveKey& reservekey)
nTotalIn += mempool.mapTx[txin.prevout.hash].vout[txin.prevout.n].nValue;
continue;
}
+
+ if (!txindex.vSpent[txin.prevout.n].IsNull())
+ printf("ERROR: mempool transaction input is spent! txid=%s input=%s\n", txPrev.GetHash().ToString().c_str(), txin.prevout.ToString().c_str());
+
int64 nValueIn = txPrev.vout[txin.prevout.n].nValue;
nTotalIn += nValueIn;

0 comments on commit 7e15b68

Please sign in to comment.