]> Git Repo - VerusCoin.git/blobdiff - src/main.cpp
add spentindex RPC for bitcore block explorer
[VerusCoin.git] / src / main.cpp
index c0cd9b043eaa3bc23482bb76411e257fe0dca5b7..793b824d6207deacd51dd0ee8e0a09ec7289d873 100644 (file)
@@ -1604,6 +1604,11 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
         if (fAddressIndex) {
             pool.addAddressIndex(entry, view);
         }
+
+        // insightexplorer: Add memory spent index
+        if (fSpentIndex) {
+            pool.addSpentIndex(entry, view);
+        }
     }
 
     SyncWithWallets(tx, NULL);
@@ -1616,6 +1621,8 @@ bool GetSpentIndex(CSpentIndexKey &key, CSpentIndexValue &value)
     AssertLockHeld(cs_main);
     if (!fSpentIndex)
         return false;
+    if (mempool.getSpentIndex(key, value))
+        return true;
     return pblocktree->ReadSpentIndex(key, value);
 }
 
This page took 0.021043 seconds and 4 git commands to generate.