Uses of Class
com.exonum.binding.core.blockchain.Block
Package | Description |
---|---|
com.exonum.binding.core.blockchain | |
com.exonum.binding.core.blockchain.serialization | |
com.exonum.binding.testkit |
-
Uses of Block in com.exonum.binding.core.blockchain
Methods in com.exonum.binding.core.blockchain that return Block Modifier and Type Method Description Block
Block.Builder. build()
Creates a new block with the set arguments.static Block
Block. fromMessage(Blockchain.Block blockMessage)
Creates a block from the block message.Block
Blockchain. getBlock(long height)
Returns the block at the given height.Block
Blockchain. getLastBlock()
Returns the latest committed block.static Block
Block. parseFrom(byte[] serializedBlock)
Creates a block from the serialized block message.Methods in com.exonum.binding.core.blockchain that return types with arguments of type Block Modifier and Type Method Description java.util.Optional<Block>
Blockchain. findBlock(HashCode blockHash)
Returns a block object for given block hash.MapIndex<HashCode,Block>
Blockchain. getBlocks()
Returns a map that stores a block object for every block hash.static com.google.gson.TypeAdapter<Block>
Block. typeAdapter(com.google.gson.Gson gson)
Provides a Gson type adapter for this class.Methods in com.exonum.binding.core.blockchain with parameters of type Block Modifier and Type Method Description boolean
Blockchain. containsBlock(Block block)
Returns true if the blockchain contains exactly the same block as the passed value; false if it does not contain such block.ProofListIndexProxy<HashCode>
Blockchain. getBlockTransactions(Block block)
Returns a proof list of transaction hashes committed in the given block. -
Uses of Block in com.exonum.binding.core.blockchain.serialization
Methods in com.exonum.binding.core.blockchain.serialization that return Block Modifier and Type Method Description Block
BlockSerializer. fromBytes(byte[] binaryBlock)
static Block
BlockSerializer. newBlockInternal(Blockchain.Block blockMessage, HashCode blockHash)
Creates a block from a message and the block hash.Methods in com.exonum.binding.core.blockchain.serialization with parameters of type Block Modifier and Type Method Description byte[]
BlockSerializer. toBytes(Block value)
-
Uses of Block in com.exonum.binding.testkit
Methods in com.exonum.binding.testkit that return Block Modifier and Type Method Description Block
TestKit. createBlock()
Creates a block with all in-pool transactions.Block
TestKit. createBlockWithTransactions(TransactionMessage... transactions)
Creates a block with the given transaction(s).Block
TestKit. createBlockWithTransactions(java.lang.Iterable<TransactionMessage> transactions)
Creates a block with the given transactions.