diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2012-09-25 23:04:54 +0200 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2012-10-20 23:08:57 +0200 |
commit | beeb57610cf57c1d802be993ac0e98211bfc5f0c (patch) | |
tree | adf8ec903008407b95da0467a0ea8fcbf4909938 /src/main.h | |
parent | e1bfbab8029c33102889d7d970da5b6cc32ff75b (diff) |
Add gettxout and gettxoutsetinfo RPCs
Diffstat (limited to 'src/main.h')
-rw-r--r-- | src/main.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main.h b/src/main.h index 1126feb09b..75ee7a9be5 100644 --- a/src/main.h +++ b/src/main.h @@ -1791,6 +1791,16 @@ public: extern CTxMemPool mempool; +struct CCoinsStats +{ + int nHeight; + uint64 nTransactions; + uint64 nTransactionOutputs; + uint64 nSerializedSize; + + CCoinsStats() : nHeight(0), nTransactions(0), nTransactionOutputs(0), nSerializedSize(0) {} +}; + /** Abstract view on the open txout dataset. */ class CCoinsView { @@ -1811,6 +1821,7 @@ public: // Modify the currently active block index virtual bool SetBestBlock(CBlockIndex *pindex); virtual bool BatchWrite(const std::map<uint256, CCoins> &mapCoins, CBlockIndex *pindex); + virtual bool GetStats(CCoinsStats &stats); }; /** CCoinsView backed by another CCoinsView */ @@ -1828,6 +1839,7 @@ public: bool SetBestBlock(CBlockIndex *pindex); void SetBackend(CCoinsView &viewIn); bool BatchWrite(const std::map<uint256, CCoins> &mapCoins, CBlockIndex *pindex); + bool GetStats(CCoinsStats &stats); }; /** CCoinsView that adds a memory cache for transactions to another CCoinsView */ |