Revert "make snapshots the default behavior" (#4708)

* revert snapshots-by-default

Signed-off-by: garyschulte <garyschulte@gmail.com>
This commit is contained in:
garyschulte
2022-11-18 13:31:12 -08:00
committed by GitHub
parent e5d73e0cca
commit d78267397e
2 changed files with 5 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ import org.immutables.value.Value;
public interface DataStorageConfiguration {
long DEFAULT_BONSAI_MAX_LAYERS_TO_LOAD = 512;
boolean DEFAULT_BONSAI_USE_SNAPSHOTS = true;
boolean DEFAULT_BONSAI_USE_SNAPSHOTS = false;
DataStorageConfiguration DEFAULT_CONFIG =
ImmutableDataStorageConfiguration.builder()

View File

@@ -96,7 +96,10 @@ public class BonsaiWorldStateArchiveTest {
public void testGetMutableReturnEmptyWhenLoadMoreThanLimitLayersBack() {
bonsaiWorldStateArchive =
new BonsaiWorldStateArchive(
new BonsaiWorldStateKeyValueStorage(storageProvider), blockchain, Optional.of(512L));
new BonsaiWorldStateKeyValueStorage(storageProvider),
blockchain,
Optional.of(512L),
false);
final BlockHeader blockHeader = blockBuilder.number(0).buildHeader();
final BlockHeader chainHead = blockBuilder.number(512).buildHeader();
when(blockchain.getBlockHeader(eq(blockHeader.getHash()))).thenReturn(Optional.of(blockHeader));