mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Merge c1223188e0 into merged_master (Bitcoin PR bitcoin/bitcoin#29672)
This commit is contained in:
commit
09403d5a37
15 changed files with 56 additions and 61 deletions
|
|
@ -494,7 +494,7 @@ bool BlockManager::LoadBlockIndex(ChainstateManager& chainman, const std::option
|
|||
if (snapshot_blockhash) {
|
||||
const std::optional<AssumeutxoData> maybe_au_data = GetParams().AssumeutxoForBlockhash(*snapshot_blockhash);
|
||||
if (!maybe_au_data) {
|
||||
m_opts.notifications.fatalError(strprintf("Assumeutxo data not found for the given blockhash '%s'.", snapshot_blockhash->ToString()));
|
||||
m_opts.notifications.fatalError(strprintf(_("Assumeutxo data not found for the given blockhash '%s'."), snapshot_blockhash->ToString()));
|
||||
return false;
|
||||
}
|
||||
const AssumeutxoData& au_data = *Assert(maybe_au_data);
|
||||
|
|
@ -834,7 +834,7 @@ bool BlockManager::FlushUndoFile(int block_file, bool finalize)
|
|||
{
|
||||
FlatFilePos undo_pos_old(block_file, m_blockfile_info[block_file].nUndoSize);
|
||||
if (!UndoFileSeq().Flush(undo_pos_old, finalize)) {
|
||||
m_opts.notifications.flushError("Flushing undo file to disk failed. This is likely the result of an I/O error.");
|
||||
m_opts.notifications.flushError(_("Flushing undo file to disk failed. This is likely the result of an I/O error."));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
@ -856,7 +856,7 @@ bool BlockManager::FlushBlockFile(int blockfile_num, bool fFinalize, bool finali
|
|||
|
||||
FlatFilePos block_pos_old(blockfile_num, m_blockfile_info[blockfile_num].nSize);
|
||||
if (!BlockFileSeq().Flush(block_pos_old, fFinalize)) {
|
||||
m_opts.notifications.flushError("Flushing block file to disk failed. This is likely the result of an I/O error.");
|
||||
m_opts.notifications.flushError(_("Flushing block file to disk failed. This is likely the result of an I/O error."));
|
||||
success = false;
|
||||
}
|
||||
// we do not always flush the undo file, as the chain tip may be lagging behind the incoming blocks,
|
||||
|
|
@ -1028,7 +1028,7 @@ bool BlockManager::FindBlockPos(FlatFilePos& pos, unsigned int nAddSize, unsigne
|
|||
bool out_of_space;
|
||||
size_t bytes_allocated = BlockFileSeq().Allocate(pos, nAddSize, out_of_space);
|
||||
if (out_of_space) {
|
||||
m_opts.notifications.fatalError("Disk space is too low!", _("Disk space is too low!"));
|
||||
m_opts.notifications.fatalError(_("Disk space is too low!"));
|
||||
return false;
|
||||
}
|
||||
if (bytes_allocated != 0 && IsPruneMode()) {
|
||||
|
|
@ -1053,7 +1053,7 @@ bool BlockManager::FindUndoPos(BlockValidationState& state, int nFile, FlatFileP
|
|||
bool out_of_space;
|
||||
size_t bytes_allocated = UndoFileSeq().Allocate(pos, nAddSize, out_of_space);
|
||||
if (out_of_space) {
|
||||
return FatalError(m_opts.notifications, state, "Disk space is too low!", _("Disk space is too low!"));
|
||||
return FatalError(m_opts.notifications, state, _("Disk space is too low!"));
|
||||
}
|
||||
if (bytes_allocated != 0 && IsPruneMode()) {
|
||||
m_check_for_pruning = true;
|
||||
|
|
@ -1101,7 +1101,7 @@ bool BlockManager::WriteUndoDataForBlock(const CBlockUndo& blockundo, BlockValid
|
|||
return false;
|
||||
}
|
||||
if (!UndoWriteToDisk(blockundo, _pos, block.pprev->GetBlockHash())) {
|
||||
return FatalError(m_opts.notifications, state, "Failed to write undo data");
|
||||
return FatalError(m_opts.notifications, state, _("Failed to write undo data."));
|
||||
}
|
||||
// rev files are written in block height order, whereas blk files are written as blocks come in (often out of order)
|
||||
// we want to flush the rev (undo) file once we've written the last block, which is indicated by the last height
|
||||
|
|
@ -1244,7 +1244,7 @@ FlatFilePos BlockManager::SaveBlockToDisk(const CBlock& block, int nHeight, cons
|
|||
}
|
||||
if (!position_known) {
|
||||
if (!WriteBlockToDisk(block, blockPos)) {
|
||||
m_opts.notifications.fatalError("Failed to write block");
|
||||
m_opts.notifications.fatalError(_("Failed to write block."));
|
||||
return FlatFilePos();
|
||||
}
|
||||
}
|
||||
|
|
@ -1328,7 +1328,7 @@ void ImportBlocks(ChainstateManager& chainman, std::vector<fs::path> vImportFile
|
|||
for (Chainstate* chainstate : WITH_LOCK(::cs_main, return chainman.GetAll())) {
|
||||
BlockValidationState state;
|
||||
if (!chainstate->ActivateBestChain(state, nullptr)) {
|
||||
chainman.GetNotifications().fatalError(strprintf("Failed to connect best block (%s)", state.ToString()));
|
||||
chainman.GetNotifications().fatalError(strprintf(_("Failed to connect best block (%s)."), state.ToString()));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue