MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / Next

Method Next

src/wallet/sqlite.cpp:570–588  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

568}
569
570DatabaseCursor::Status SQLiteCursor::Next(DataStream& key, DataStream& value)
571{
572 int res = sqlite3_step(m_cursor_stmt);
573 if (res == SQLITE_DONE) {
574 return Status::DONE;
575 }
576 if (res != SQLITE_ROW) {
577 LogWarning("Unable to execute cursor step: %s", sqlite3_errstr(res));
578 return Status::FAIL;
579 }
580
581 key.clear();
582 value.clear();
583
584 // Leftmost column in result is index 0
585 key.write(SpanFromBlob(m_cursor_stmt, 0));
586 value.write(SpanFromBlob(m_cursor_stmt, 1));
587 return Status::MORE;
588}
589
590SQLiteCursor::~SQLiteCursor()
591{

Callers 15

MigrateToSQLiteMethod · 0.45
IsEncryptedMethod · 0.45
LoadRecordsFunction · 0.45
HasLegacyRecordsFunction · 0.45
DumpWalletFunction · 0.45
CheckPrefixFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
BOOST_FIXTURE_TEST_CASEFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
CreatePairsFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45

Calls 3

SpanFromBlobFunction · 0.85
clearMethod · 0.45
writeMethod · 0.45

Tested by 8

CheckPrefixFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
BOOST_FIXTURE_TEST_CASEFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
CreatePairsFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
VerifyIteratorFunction · 0.36