Skip to content

Commit

Permalink
address pr comments
Browse files Browse the repository at this point in the history
Signed-off-by: Atanas Atanasov <[email protected]>
  • Loading branch information
ata-nas committed Mar 5, 2025
1 parent c0fa3ca commit 322c86a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,9 @@ private void attemptAcks() {
// again. What would be the best way to hande inability to move the block with
// the limitations we current have?
// @todo(774) we should use a response code for failed persistence here
LOGGER.log(
ERROR,
"Failed to move Block with number [%d] from unverified to live storage"
.formatted(nextBlock),
e);
final String message = "Failed to move Block with number [%d] from unverified to live storage"
.formatted(nextBlock);
LOGGER.log(ERROR, message, e);
blockVerificationFailed(nextBlock);
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ public Optional<BlockUnparsed> read(final long blockNumber) throws IOException,
final ArchiveBlockPath archiveBlockPath = optArchivedBlock.get();
final Path zipFilePath = archiveBlockPath.dirPath().resolve(archiveBlockPath.zipFileName());
final BlockUnparsed value;
// @todo(736) (depends on 598!) update reader to be able to read
// appended blocks
// @todo(741) update reader to use zipfs to read blocks
try (final ZipFile zipFile = new ZipFile(zipFilePath.toFile())) {
final ZipEntry entry = zipFile.getEntry(archiveBlockPath.zipEntryName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ private BlockPersistenceResult doPersistBlock() {
return new BlockPersistenceResult(blockNumber, BlockPersistenceStatus.DUPLICATE_BLOCK);
} else {
boolean blockComplete = false;
// @todo(598) write (append to file) items as they come in as an improvement
final List<BlockItemUnparsed> localBlockItems = new LinkedList<>();
while (!blockComplete) { // loop until received all items (until block proof arrives)
try {
Expand Down

0 comments on commit 322c86a

Please sign in to comment.