mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-03 20:35:17 +02:00
refactor: inline constant return value of CDBWrapper::WriteBatch
`WriteBatch` can only ever return `true` - its errors are handled by throwing a `throw dbwrapper_error` instead. The boolean return value is quite confusing, especially since it's symmetric with `CDBWrapper::Read`, which catches the exceptions and returns a boolean instead. We're removing the constant return value and inlining `true` for its usages.
This commit is contained in:
@@ -262,7 +262,7 @@ bool BaseIndex::Commit()
|
||||
ok = CustomCommit(batch);
|
||||
if (ok) {
|
||||
GetDB().WriteBestBlock(batch, GetLocator(*m_chain, m_best_block_index.load()->GetBlockHash()));
|
||||
ok = GetDB().WriteBatch(batch);
|
||||
GetDB().WriteBatch(batch);
|
||||
}
|
||||
}
|
||||
if (!ok) {
|
||||
|
||||
Reference in New Issue
Block a user