Skip to content

Commit 55e5fc0

Browse files
committed
cleanup and addressing of pr feedback
Signed-off-by: Atanas Atanasov <a.v.atanasov98@gmail.com>
1 parent 54c5266 commit 55e5fc0

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

block-node/app/src/testFixtures/java/org/hiero/block/node/app/fixtures/blocks/InMemoryBlockAccessor.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import com.hedera.hapi.block.stream.Block;
55
import com.hedera.hapi.block.stream.BlockItem;
66
import java.util.List;
7-
import java.util.Objects;
87
import org.hiero.block.node.spi.historicalblocks.BlockAccessor;
98

109
/**
@@ -39,8 +38,7 @@ public InMemoryBlockAccessor(final List<BlockItem> blockItems) {
3938
}
4039
// Create a Block from the provided block items
4140
block = Block.newBuilder().items(blockItems).build();
42-
blockNumber =
43-
Objects.requireNonNull(block.items().getFirst().blockHeader()).number();
41+
blockNumber = block.items().getFirst().blockHeader().number();
4442
}
4543

4644
/**

block-node/app/src/testFixtures/java/org/hiero/block/node/app/fixtures/plugintest/SimpleInMemoryHistoricalBlockFacility.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,14 @@ public void clearTemporaryAvailableBlocks() {
147147

148148
/**
149149
* {@inheritDoc}
150-
*
151150
* <p>
151+
* If a temporary override is set using
152+
* {@link #setTemporaryAvailableBlocks(SimpleBlockRangeSet)}, then that
153+
* override will be returned until cleared with
154+
* {@link #clearTemporaryAvailableBlocks()}. Any updates to the available
155+
* blocks in the facility will not affect the temporary override. They will
156+
* be reflected however in the original available blocks set (accessible
157+
* when there is no override).
152158
*/
153159
@Override
154160
public BlockRangeSet availableBlocks() {

block-node/block-providers/files.historic/src/main/java/org/hiero/block/node/blocks/files/historic/BlocksFilesHistoricPlugin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,9 @@ public BlockRangeSet availableBlocks() {
197197
*/
198198
@Override
199199
public void handlePersisted(PersistedNotification notification) {
200-
// all operations here until we release the caller thread are queued up
200+
// all operations are queued up here until we release the caller thread
201201
// by the block messaging facility, so we can safely perform
202-
// calculations and decide if we will submit or not a task
202+
// calculations and decide if we will submit a task or not
203203
if (notification.blockProviderPriority() > defaultPriority()) {
204204
attemptZipping();
205205
}

0 commit comments

Comments
 (0)