Snapsync persist state (#4381)

This PR avoids restarting the download of the world state from scratch when restarting Besu

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
This commit is contained in:
matkt
2022-11-01 14:18:15 +01:00
committed by GitHub
parent 6f20060182
commit da9b10767a
31 changed files with 489 additions and 433 deletions

View File

@@ -30,6 +30,7 @@ import java.util.concurrent.CountDownLatch;
import java.util.function.Function;
import java.util.stream.Stream;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.tuweni.bytes.Bytes;
import org.junit.Ignore;
import org.junit.Test;
@@ -83,7 +84,7 @@ public abstract class AbstractKeyValueStorageTest {
.collect(toUnmodifiableList());
keys.forEach(key -> tx.put(key, bytesFromHexString("0ABC")));
tx.commit();
assertThat(store.streamKeys().collect(toUnmodifiableSet()))
assertThat(store.stream().map(Pair::getKey).collect(toUnmodifiableSet()))
.containsExactlyInAnyOrder(keys.toArray(new byte[][] {}));
}