mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Support bulk writes.
This commit is contained in:
@@ -119,4 +119,14 @@ HashedObject::pointer HashedObject::retrieve(const uint256& hash)
|
||||
return obj;
|
||||
}
|
||||
|
||||
HashedObjectBulkWriter::HashedObjectBulkWriter() : sl(theApp->getHashNodeDB()->getDBLock())
|
||||
{
|
||||
theApp->getHashNodeDB()->getDB()->executeSQL("BEGIN TRANSACTION;");
|
||||
}
|
||||
|
||||
HashedObjectBulkWriter::~HashedObjectBulkWriter()
|
||||
{
|
||||
theApp->getHashNodeDB()->getDB()->executeSQL("END TRANSACTION;");
|
||||
}
|
||||
|
||||
// vim:ts=4
|
||||
|
||||
Reference in New Issue
Block a user