aboutsummaryrefslogtreecommitdiff
path: root/src/txdb.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/txdb.h')
-rw-r--r--src/txdb.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/txdb.h b/src/txdb.h
index 0cf7e2f1b8..e1096ffeba 100644
--- a/src/txdb.h
+++ b/src/txdb.h
@@ -60,7 +60,7 @@ public:
uint256 GetBestBlock() const override;
std::vector<uint256> GetHeadBlocks() const override;
bool BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock) override;
- CCoinsViewCursor *Cursor() const override;
+ std::unique_ptr<CCoinsViewCursor> Cursor() const override;
//! Attempt to update from an older database format. Returns whether an error occurred.
bool Upgrade();
@@ -74,6 +74,8 @@ public:
class CCoinsViewDBCursor: public CCoinsViewCursor
{
public:
+ CCoinsViewDBCursor(CDBIterator* pcursorIn, const uint256 &hashBlockIn):
+ CCoinsViewCursor(hashBlockIn), pcursor(pcursorIn) {}
~CCoinsViewDBCursor() {}
bool GetKey(COutPoint &key) const override;
@@ -84,8 +86,6 @@ public:
void Next() override;
private:
- CCoinsViewDBCursor(CDBIterator* pcursorIn, const uint256 &hashBlockIn):
- CCoinsViewCursor(hashBlockIn), pcursor(pcursorIn) {}
std::unique_ptr<CDBIterator> pcursor;
std::pair<char, COutPoint> keyTmp;