use of com.hedera.services.state.merkle.MerkleOptionalBlob in project hedera-services by hashgraph.
the class PojoFs method fromDisk.
public static PojoFs fromDisk(String dumpLoc) throws Exception {
try (MerkleDataInputStream in = new MerkleDataInputStream(Files.newInputStream(Path.of(dumpLoc)))) {
MerkleMap<String, MerkleOptionalBlob> fcm = in.readMerkleTree(Integer.MAX_VALUE);
var pojo = from(fcm);
return pojo;
}
}
use of com.hedera.services.state.merkle.MerkleOptionalBlob in project hedera-services by hashgraph.
the class ReleaseTwentyTwoMigrationTest method setUp.
@BeforeEach
void setUp() throws IOException {
TestFileUtils.blowAwayDirIfPresent(TEST_JDB_LOC);
final String dataPath = "/0/f2";
legacyBlobs.put(dataPath, new MerkleOptionalBlob(dataBlob));
final String metadataPath = "/0/k3";
legacyBlobs.put(metadataPath, new MerkleOptionalBlob(metadataBlob));
final String bytecodePath = "/0/s4";
legacyBlobs.put(bytecodePath, new MerkleOptionalBlob(bytecodeBlob));
final String storagePath = "/0/d5";
legacyBlobs.put(storagePath, new MerkleOptionalBlob(CommonUtils.unhex(contract5Storage)));
final String expiryTimePath = "/0/e6";
legacyBlobs.put(expiryTimePath, new MerkleOptionalBlob(expiryTimeBlob));
final String missingStoragePath = "/0/d7";
legacyBlobs.put(missingStoragePath, new MerkleOptionalBlob(CommonUtils.unhex(missingContractStorage)));
}
Aggregations