connectBlockchain

fun connectBlockchain(cs: ChainSelector, initializer: Blockchain.() -> Unit? = null): Blockchain

Connect to, and return an existing blockchain. Create the blockchain object and start it processing, if it does not already exist.

Parameters

initializer

Run this function after the blockchain is created. If the blockchain was just created, this function is run before it has been started. If an existing blockchain is reused, the function will be called at whatever state the blockchain is currently in, and then the blockchain will be started (if it is not yet started).