package blockchain
- Alphabetic
- Public
- Protected
Type Members
- case class Blockchain(headers: Vector[BlockHeaderDb]) extends BaseBlockChain with Product with Serializable
<invalid inheritdoc annotation>
- sealed abstract class BlockchainUpdate extends AnyRef
Represens the state of a batch of BlockHeaders being added to our blockchain
Represens the state of a batch of BlockHeaders being added to our blockchain
An example of a Failed update is when we receive a BlockHeader that is invalid and because of a TipUpdateFailure because of BadPOW or a BadNonce etc
- sealed abstract class ChainException extends RuntimeException
A base class for various types of block chain exceptions
- class ChainHandler extends ChainApi with ChainVerificationLogger
Chain Handler is meant to be the reference implementation of ChainApi, this is the entry point in to the chain project.
Chain Handler is meant to be the reference implementation of ChainApi, this is the entry point in to the chain project.
This implementation of ChainApi reads all values directly from the database. If you want an optimized version that caches headers locally please see ChainHandlerCached
- case class ChainHandlerCached(blockHeaderDAO: BlockHeaderDAO, filterHeaderDAO: CompactFilterHeaderDAO, filterDAO: CompactFilterDAO, stateDAO: ChainStateDescriptorDAO, blockchains: Vector[Blockchain], blockFilterCheckpoints: Map[DoubleSha256DigestBE, DoubleSha256DigestBE])(implicit chainConfig: ChainAppConfig, executionContext: ExecutionContext) extends ChainHandler with Product with Serializable
An optimized version of ChainHandler that avoids database reads for determining what the best block header is.
An optimized version of ChainHandler that avoids database reads for determining what the best block header is. This should be used with care as it is possible the cached blockchains may be out of date! Unless you know what you are doing, you should probably use ChainHandler
- case class CheckHeaderResult(result: TipUpdateResult, chain: Blockchain) extends Product with Serializable
- sealed trait ConnectTipResult extends AnyRef
The result indicating how the TipUpdateResult modified the chain.
The result indicating how the TipUpdateResult modified the chain.
We can
- Extend the chain 2. Reorg the chain 3. Fail to connect to anything in the chain
- case class DuplicateFilters(message: String) extends ChainException with Product with Serializable
org.bitcoins.chain.blockchain.ChainHandler tried to process multiple filters for the same block hash
- case class DuplicateHeaders(message: String) extends ChainException with Product with Serializable
- case class InvalidBlockHeader(message: String) extends ChainException with Product with Serializable
- case class InvalidBlockRange(message: String) extends ChainException with Product with Serializable
The given block range is invalid
- case class UnknownBlockHash(message: String) extends ChainException with Product with Serializable
org.bitcoins.chain.blockchain.ChainHandler cannot find a blockchain item by its block hash
- case class UnknownBlockHeight(message: String) extends ChainException with Product with Serializable
org.bitcoins.chain.blockchain.ChainHandler cannot find a blockchain item by its height
- case class UnknownFilterHash(message: String) extends ChainException with Product with Serializable
org.bitcoins.chain.blockchain.ChainHandler cannot find a compact filter or header by its filter hash
Value Members
- object Blockchain extends BaseBlockChainCompObject with Serializable
- object BlockchainUpdate
- object ChainHandler
- object ChainHandlerCached extends Serializable
- object ConnectTipResult