Line data Source code
1 : // Copyright (c) 2017-2020 The PIVX Core developers 2 : // Distributed under the MIT/X11 software license, see the accompanying 3 : // file COPYING or http://www.opensource.org/licenses/mit-license.php. 4 : 5 : #ifndef PIVX_SPORKDB_H 6 : #define PIVX_SPORKDB_H 7 : 8 : #include "fs.h" 9 : #include "dbwrapper.h" 10 : #include "spork.h" 11 : 12 475 : class CSporkDB : public CDBWrapper 13 : { 14 : public: 15 : explicit CSporkDB(size_t nCacheSize, bool fMemory = false, bool fWipe = false); 16 : 17 : private: 18 : CSporkDB(const CSporkDB&); 19 : void operator=(const CSporkDB&); 20 : 21 : public: 22 : bool WriteSpork(const SporkId nSporkId, const CSporkMessage& spork); 23 : bool ReadSpork(const SporkId nSporkId, CSporkMessage& spork); 24 : bool SporkExists(const SporkId nSporkId); 25 : }; 26 : 27 : 28 : #endif // PIVX_SPORKDB_H