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. 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
- Alphabetic
- By Inheritance
- ChainHandlerCached
- Serializable
- Product
- Equals
- ChainHandler
- ChainVerificationLogger
- Logging
- ChainApi
- ChainQueryApi
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new ChainHandlerCached(blockHeaderDAO: BlockHeaderDAO, filterHeaderDAO: CompactFilterHeaderDAO, filterDAO: CompactFilterDAO, stateDAO: ChainStateDescriptorDAO, blockchains: Vector[Blockchain], blockFilterCheckpoints: Map[DoubleSha256DigestBE, DoubleSha256DigestBE])(implicit chainConfig: ChainAppConfig, executionContext: ExecutionContext)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val blockFilterCheckpoints: Map[DoubleSha256DigestBE, DoubleSha256DigestBE]
- Definition Classes
- ChainHandlerCached → ChainHandler
- val blockHeaderDAO: BlockHeaderDAO
- Definition Classes
- ChainHandlerCached → ChainHandler
- val blockchains: Vector[Blockchain]
- implicit val chainConfig: ChainAppConfig
- Definition Classes
- ChainHandlerCached → ChainHandler
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def copyWith(blockHeaderDAO: BlockHeaderDAO = blockHeaderDAO, filterHeaderDAO: CompactFilterHeaderDAO = filterHeaderDAO, filterDAO: CompactFilterDAO = filterDAO, stateDAO: ChainStateDescriptorDAO = stateDAO, blockFilterCheckpoints: Map[DoubleSha256DigestBE, DoubleSha256DigestBE] = blockFilterCheckpoints): ChainHandler
- Definition Classes
- ChainHandler
- def debug(mkr: Marker, msg: => Any, t: => Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def debug(msg: => Any, t: => Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def debug(msg: => Any): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def epochSecondToBlockHeight(time: Long): Future[Int]
- Definition Classes
- ChainHandler → ChainQueryApi
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def error(mkr: Marker, msg: => Any, t: => Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def error(msg: => Any, t: => Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def error(msg: => Any): Unit
- Attributes
- protected
- Definition Classes
- Logging
- val filterDAO: CompactFilterDAO
- Definition Classes
- ChainHandlerCached → ChainHandler
- val filterHeaderDAO: CompactFilterHeaderDAO
- Definition Classes
- ChainHandlerCached → ChainHandler
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def getBestBlockHash(): Future[DoubleSha256DigestBE]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- ChainHandler → ChainQueryApi
- def getBestBlockHeader(): Future[BlockHeaderDb]
Gets the best block header from the given blockchains parameter
Gets the best block header from the given blockchains parameter
- Definition Classes
- ChainHandlerCached → ChainHandler → ChainApi
- def getBestBlockHeaderHelper(chains: Vector[Blockchain]): BlockHeaderDb
Given a set of blockchains, determines which one has the best header
Given a set of blockchains, determines which one has the best header
- Attributes
- protected
- Definition Classes
- ChainHandler
- def getBestFilter(): Future[Option[CompactFilterDb]]
- Definition Classes
- ChainHandler → ChainApi
- def getBestFilterHeader(): Future[Option[CompactFilterHeaderDb]]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- ChainHandlerCached → ChainHandler → ChainApi
- def getBestFilterHeaderWithChains(blockchains: Vector[Blockchain]): Future[Option[CompactFilterHeaderDb]]
- Attributes
- protected
- Definition Classes
- ChainHandler
- def getBestHashBlockHeight()(implicit ec: ExecutionContext): Future[Int]
- Definition Classes
- ChainQueryApi
- def getBlockCount(): Future[Int]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- ChainHandler → ChainApi
- def getBlockHeight(blockHash: DoubleSha256DigestBE): Future[Option[Int]]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- ChainHandler → ChainQueryApi
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getFilter(blockHash: DoubleSha256DigestBE): Future[Option[CompactFilterDb]]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- ChainHandler → ChainApi
- def getFilterCount(): Future[Int]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- ChainHandler → ChainApi → ChainQueryApi
- def getFilterHeader(blockHash: DoubleSha256DigestBE): Future[Option[CompactFilterHeaderDb]]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- ChainHandler → ChainApi
- def getFilterHeaderCount(): Future[Int]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- ChainHandler → ChainApi
- def getFilterHeadersAtHeight(height: Int): Future[Vector[CompactFilterHeaderDb]]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- ChainHandler → ChainApi
- def getFiltersAtHeight(height: Int): Future[Vector[CompactFilterDb]]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- ChainHandler → ChainApi
- def getFiltersBetweenHeights(startHeight: Int, endHeight: Int): Future[Vector[FilterResponse]]
- Definition Classes
- ChainHandler → ChainQueryApi
- def getHeader(hash: DoubleSha256DigestBE): Future[Option[BlockHeaderDb]]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- ChainHandler → ChainApi
- def getHeaders(hashes: Vector[DoubleSha256DigestBE]): Future[Vector[Option[BlockHeaderDb]]]
- Definition Classes
- ChainHandler → ChainApi
- def getHeadersAtHeight(height: Int): Future[Vector[BlockHeaderDb]]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- ChainHandler → ChainApi
- def getHeadersBetween(from: BlockHeaderDb, to: BlockHeaderDb): Future[Vector[BlockHeaderDb]]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- ChainHandler → ChainApi
- def getHeightByBlockStamp(blockStamp: BlockStamp): Future[Int]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- ChainHandler → ChainApi → ChainQueryApi
- def getMedianTimePast(): Future[Long]
calculates the median time passed
calculates the median time passed
- Definition Classes
- ChainHandler → ChainQueryApi
- def getNumberOfConfirmations(blockHash: DoubleSha256DigestBE): Future[Option[Int]]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- ChainHandler → ChainQueryApi
- def info(mkr: Marker, msg: => Any, t: => Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def info(msg: => Any, t: => Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def info(msg: => Any): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def isDebugEnabled: Boolean
- Attributes
- protected
- Definition Classes
- Logging
- def isErrorEnabled: Boolean
- Attributes
- protected
- Definition Classes
- Logging
- def isIBD(): Future[Boolean]
- Definition Classes
- ChainHandler → ChainApi
- def isInfoEnabled: Boolean
- Attributes
- protected
- Definition Classes
- Logging
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isMissingChainWork: Future[Boolean]
- Definition Classes
- ChainHandler
- def isSyncing(): Future[Boolean]
- Definition Classes
- ChainHandler → ChainApi
- def isTraceEnabled: Boolean
- Attributes
- protected
- Definition Classes
- Logging
- def isWarnEnabled: Boolean
- Attributes
- protected
- Definition Classes
- Logging
- def logger: Logger
- Attributes
- protected
- Definition Classes
- Logging
- def loggerName: String
- Attributes
- protected
- Definition Classes
- Logging
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nextBlockHeaderBatchRange(prevStopHash: DoubleSha256DigestBE, batchSize: Int): Future[Option[FilterSyncMarker]]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- ChainHandlerCached → ChainHandler → ChainApi
- def nextBlockHeaderBatchRangeWithChains(prevStopHash: DoubleSha256DigestBE, batchSize: Int, blockchains: Vector[Blockchain]): Future[Option[FilterSyncMarker]]
- Attributes
- protected
- Definition Classes
- ChainHandler
- def nextFilterHeaderBatchRange(filterHeight: Int, batchSize: Int): Future[Option[FilterSyncMarker]]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- ChainHandler → ChainApi
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def processCheckpoint(filterHeaderHash: DoubleSha256DigestBE, blockHash: DoubleSha256DigestBE): Future[ChainApi]
- Definition Classes
- ChainApi
- def processCheckpoints(checkpoints: Vector[DoubleSha256DigestBE], blockHash: DoubleSha256DigestBE): Future[ChainApi]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- ChainHandler → ChainApi
- def processFilter(message: CompactFilterMessage): Future[ChainApi]
- Definition Classes
- ChainApi
- def processFilterHeader(filterHeader: FilterHeader, blockHash: DoubleSha256DigestBE): Future[ChainApi]
- Definition Classes
- ChainApi
- def processFilterHeaders(filterHeaders: Vector[FilterHeader], stopHash: DoubleSha256DigestBE): Future[ChainApi]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- ChainHandler → ChainApi
- def processFilters(messages: Vector[CompactFilterMessage]): Future[ChainApi]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- ChainHandler → ChainApi
- def processHeader(header: BlockHeader): Future[ChainApi]
- Definition Classes
- ChainApi
- def processHeaders(headers: Vector[BlockHeader]): Future[ChainApi]
<invalid inheritdoc annotation>
<invalid inheritdoc annotation>
- Definition Classes
- ChainHandlerCached → ChainHandler → ChainApi
- def processHeadersWithChains(headers: Vector[BlockHeader], blockchains: Vector[Blockchain]): Future[ChainApi]
- Attributes
- protected
- Definition Classes
- ChainHandler
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def recalculateChainWork: Future[ChainHandler]
- Definition Classes
- ChainHandler
- def setIBD(value: Boolean): Future[ChainApi]
- Definition Classes
- ChainHandler → ChainApi
- def setSyncing(value: Boolean): Future[ChainApi]
- Definition Classes
- ChainHandler → ChainApi
- val stateDAO: ChainStateDescriptorDAO
- Definition Classes
- ChainHandlerCached → ChainHandler
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toChainHandlerCached: Future[ChainHandlerCached]
- Definition Classes
- ChainHandler
- def trace(mkr: Marker, msg: => Any, t: => Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def trace(msg: => Any, t: => Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def trace(msg: => Any): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def verifyFilterHeaders(filterHeaders: Vector[CompactFilterHeaderDb]): Future[Unit]
Verifies if the previous headers exist either in the batch filterHeaders or in the database, throws if it doesn't
Verifies if the previous headers exist either in the batch filterHeaders or in the database, throws if it doesn't
- Definition Classes
- ChainHandler
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def warn(mkr: Marker, msg: => Any, t: => Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def warn(msg: => Any, t: => Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def warn(msg: => Any): Unit
- Attributes
- protected
- Definition Classes
- Logging