Search in sources :

Example 1 with VirtualMapFactory

use of com.hedera.services.state.virtual.VirtualMapFactory in project hedera-services by hashgraph.

the class ServicesState method createGenesisChildren.

void createGenesisChildren(AddressBook addressBook, long seqStart) {
    final var virtualMapFactory = new VirtualMapFactory(JasperDbBuilder::new);
    setChild(StateChildIndices.UNIQUE_TOKENS, new MerkleMap<>());
    setChild(StateChildIndices.TOKEN_ASSOCIATIONS, new MerkleMap<>());
    setChild(StateChildIndices.TOPICS, new MerkleMap<>());
    setChild(StateChildIndices.STORAGE, virtualMapFactory.newVirtualizedBlobs());
    setChild(StateChildIndices.ACCOUNTS, new MerkleMap<>());
    setChild(StateChildIndices.TOKENS, new MerkleMap<>());
    setChild(StateChildIndices.NETWORK_CTX, genesisNetworkCtxWith(seqStart));
    setChild(StateChildIndices.SPECIAL_FILES, new MerkleSpecialFiles());
    setChild(StateChildIndices.SCHEDULE_TXS, new MerkleMap<>());
    setChild(StateChildIndices.RECORD_STREAM_RUNNING_HASH, genesisRunningHashLeaf());
    setChild(StateChildIndices.ADDRESS_BOOK, addressBook);
    setChild(StateChildIndices.CONTRACT_STORAGE, virtualMapFactory.newVirtualizedStorage());
}
Also used : MerkleSpecialFiles(com.hedera.services.state.merkle.MerkleSpecialFiles) JasperDbBuilder(com.swirlds.jasperdb.JasperDbBuilder) VirtualMapFactory(com.hedera.services.state.virtual.VirtualMapFactory)

Aggregations

MerkleSpecialFiles (com.hedera.services.state.merkle.MerkleSpecialFiles)1 VirtualMapFactory (com.hedera.services.state.virtual.VirtualMapFactory)1 JasperDbBuilder (com.swirlds.jasperdb.JasperDbBuilder)1