diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2013-01-11 01:47:57 +0100 |
---|---|---|
committer | Pieter Wuille <pieterw@google.com> | 2013-01-18 14:39:11 +0100 |
commit | 2d1fa42e85c9164688aa69b3f54f015fbefc06aa (patch) | |
tree | d24823340b02d7e00af350b4592325414d5940f4 /src/txdb.h | |
parent | 2c7847349d5d4b1f3e8480c5137c2e8f3e2a5f5c (diff) |
Add optional transaction index to databases
By specifying -txindex when initializing the database, a txid-to-diskpos
index is maintained in the blktree database. This database is used to
help answering getrawtransaction() RPC queries, when enabled.
Changing the -txindex value requires a -reindex; the client will abort
at startup if the database and the specified -txindex mismatch.
Diffstat (limited to 'src/txdb.h')
-rw-r--r-- | src/txdb.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/txdb.h b/src/txdb.h index d7d327069f..ebac81b301 100644 --- a/src/txdb.h +++ b/src/txdb.h @@ -43,6 +43,10 @@ public: bool WriteLastBlockFile(int nFile); bool WriteReindexing(bool fReindex); bool ReadReindexing(bool &fReindex); + bool ReadTxIndex(const uint256 &txid, CDiskTxPos &pos); + bool WriteTxIndex(const std::vector<std::pair<uint256, CDiskTxPos> > &list); + bool WriteFlag(const std::string &name, bool fValue); + bool ReadFlag(const std::string &name, bool &fValue); bool LoadBlockIndexGuts(); }; |