Tabnine Logo
StoreBuilder.buildMetaStore
Code IndexAdd Tabnine to your IDE (free)

How to use
buildMetaStore
method
in
io.yggdrash.core.store.StoreBuilder

Best Java code snippets using io.yggdrash.core.store.StoreBuilder.buildMetaStore (Showing top 3 results out of 315)

origin: yggdrash/yggdrash

@Test
public void shouldBeBuiltMetaStore() {
  BlockHusk block = BlockChainTestUtils.genesisBlock();
  StoreBuilder builder = new StoreBuilder(new DefaultConfig());
  MetaStore store = builder.buildMetaStore(BRANCH_ID);
  store.setBestBlock(block);
  assertThat(store.contains(BlockchainMetaInfo.BRANCH.toString())).isTrue();
  assertThat(store.getBestBlockHash()).isEqualTo(block.getHash());
}
origin: yggdrash/yggdrash

metaStore = storeBuilder.buildMetaStore(genesisBlock.getBranchId());
origin: yggdrash/yggdrash

  @Test
  public void executorTest() {

    CoinContract contract = new CoinContract();
    Runtime runtime =
        new Runtime<>(
            new StateStore<>(new HashMapDbSource()),
            new TransactionReceiptStore(new HashMapDbSource())
        );
    runtime.addContract(ContractId.of("c10e873655becf550c4aece75a091f4553d6202d"), contract);

    // Block Store
    // Blockchain Runtime
    StoreBuilder builder = new StoreBuilder(new DefaultConfig(false));
    BlockStore store = builder.buildBlockStore(BRANCH_ID);
    MetaStore meta = builder.buildMetaStore(BRANCH_ID);

    BlockExecutor ex = new BlockExecutor(store, meta, runtime);

    // BlockStore add genesis block and other

    ex.runExecuteBlocks();

  }
}
io.yggdrash.core.storeStoreBuilderbuildMetaStore

Popular methods of StoreBuilder

  • <init>
  • buildBlockStore
  • buildPeerStore
  • buildTxStore
  • buildStateStore
  • buildTransactionReciptStore
  • getConfig
  • getDbSource

Popular in Java

  • Finding current android device location
  • getSystemService (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • compareTo (BigDecimal)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • JList (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now