Skip to content

Commit

Permalink
Move to latest cava build
Browse files Browse the repository at this point in the history
  • Loading branch information
atoulme committed Nov 27, 2018
1 parent 54223c2 commit f28d667
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ repositories {

dependencies {
// cava
compile 'net.consensys.cava:cava:0.2.0'
compile 'net.consensys.cava:cava:0.5.0'

// vertx
compile 'io.vertx:vertx-core:3.5.2'
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/net/consensys/orion/cmd/Orion.java
Original file line number Diff line number Diff line change
Expand Up @@ -441,13 +441,13 @@ private KeyValueStore createStorage(String storage, Path storagePath) {
Path dbPath = storagePath.resolve(db);
if (storage.toLowerCase().startsWith("mapdb")) {
try {
return new MapDBKeyValueStore(dbPath);
return MapDBKeyValueStore.open(dbPath);
} catch (IOException e) {
throw new OrionStartException("Couldn't create MapDB store: " + dbPath, e);
}
} else if (storage.toLowerCase().startsWith("leveldb")) {
try {
return new LevelDBKeyValueStore(dbPath);
return LevelDBKeyValueStore.open(dbPath);
} catch (IOException e) {
throw new OrionStartException("Couldn't create LevelDB store: " + dbPath, e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public String generateDigest(EncryptedPayload data) {
public AsyncResult<Optional<EncryptedPayload>> get(String key) {
Bytes keyBytes = Bytes.wrap(key.getBytes(UTF_8));
return store.getAsync(keyBytes).thenApply(
maybeBytes -> maybeBytes
.map(bytes -> Serializer.deserialize(HttpContentType.CBOR, EncryptedPayload.class, bytes.toArrayUnsafe())));
maybeBytes -> Optional.ofNullable(maybeBytes).map(
bytes -> Serializer.deserialize(HttpContentType.CBOR, EncryptedPayload.class, bytes.toArrayUnsafe())));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ void setUp(@TempDirectory Path tempDir) throws Exception {
enclave = buildEnclave(tempDir);

Path path = tempDir.resolve("routerdb");
storage = new MapDBKeyValueStore(path);
storage = MapDBKeyValueStore.open(path);
// create our vertx object
vertx = Vertx.vertx();
StorageKeyBuilder keyBuilder = new Sha512_256StorageKeyBuilder();
Expand Down

0 comments on commit f28d667

Please sign in to comment.