Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Fix bugs in block_log - v1.7.x #7202

Merged
merged 1 commit into from
Apr 24, 2019
Merged

Conversation

heifner
Copy link
Contributor

@heifner heifner commented Apr 24, 2019

Change Description

This PR fixes two bugs in block_log.

First, it allows opening a non-empty block log that contains no blocks. This actually fixes undefined behavior that would lead to a segmentation fault when attempting to open a block log that contained no blocks.

Second, a check is added to construct_index to prevent an attempt to read a block when the block log is known to not contain any blocks. In this situation, instead of throwing an exception, construct_index will now correctly leave an empty index file.

Consensus Changes

  • Consensus Changes

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

…; contruct_index should leave index file empty if block log contains no blocks
@heifner heifner merged commit e8a31e2 into release/1.7.x Apr 24, 2019
@heifner heifner deleted the fix-block-log-bugs-1.7.x branch April 24, 2019 22:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants