db: Change DatabaseCursor::Next to return status enum

Next()'s result is a tri-state - failed, more to go, complete. Replace
the way that this is returned with an enum with values FAIL, MORE, and
DONE rather than with two booleans.
This commit is contained in:
Andrew Chow
2022-11-29 22:34:26 -05:00
parent d79e8dcf29
commit 4aebd832a4
11 changed files with 49 additions and 55 deletions

View File

@@ -870,7 +870,7 @@ BOOST_FIXTURE_TEST_CASE(ZapSelectTx, TestChain100Setup)
class FailCursor : public DatabaseCursor
{
public:
bool Next(CDataStream& key, CDataStream& value, bool& complete) override { return false; }
Status Next(CDataStream& key, CDataStream& value) override { return Status::FAIL; }
};
/** RAII class that provides access to a FailDatabase. Which fails if needed. */