case class SpvNode(dataMessageHandler: DataMessageHandler, nodeConfig: NodeAppConfig, chainConfig: ChainAppConfig, actorSystem: ActorSystem, configPeersOverride: Vector[Peer] = Vector.empty) extends Node with Product with Serializable
- Alphabetic
- By Inheritance
- SpvNode
- Serializable
- Product
- Equals
- Node
- P2PLogger
- Logging
- ChainQueryApi
- NodeApi
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new SpvNode(dataMessageHandler: DataMessageHandler, nodeConfig: NodeAppConfig, chainConfig: ChainAppConfig, actorSystem: ActorSystem, configPeersOverride: Vector[Peer] = Vector.empty)
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
- val actorSystem: ActorSystem
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def bloomFilter: BloomFilter
- def broadcastTransaction(transaction: Transaction): Future[Unit]
Broadcasts the given transaction over the P2P network
Broadcasts the given transaction over the P2P network
- Definition Classes
- NodeApi
- def broadcastTransactions(transactions: Vector[Transaction]): Future[Unit]
Broadcasts the given transaction over the P2P network
- def chainApiFromDb()(implicit executionContext: ExecutionContext): Future[ChainHandlerCached]
This is constructing a chain api from disk every time we call this method This involves database calls which can be slow and expensive to construct our Blockchain
This is constructing a chain api from disk every time we call this method This involves database calls which can be slow and expensive to construct our Blockchain
- Definition Classes
- Node
- def chainAppConfig: ChainAppConfig
- val chainConfig: ChainAppConfig
- def clients: Vector[P2PClient]
Unlike our chain api, this is cached inside our node object.
Unlike our chain api, this is cached inside our node object. Internally in p2p client you will see that the chain api is updated inside of the p2p client
- Definition Classes
- Node
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- val configPeersOverride: Vector[Peer]
- val controlMessageHandler: ControlMessageHandler
- val dataMessageHandler: DataMessageHandler
- 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 downloadBlocks(blockHashes: Vector[DoubleSha256Digest]): Future[Unit]
Fetches the given blocks from the peers and calls the appropriate callbacks when done.
- def epochSecondToBlockHeight(time: Long): Future[Int]
Gets the block height of the closest block to the given time
Gets the block height of the closest block to the given time
- Definition Classes
- Node → 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
- implicit def executionContext: ExecutionContext
- Definition Classes
- Node
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def getBestBlockHash(): Future[DoubleSha256DigestBE]
Gets the hash of the block that is what we consider "best"
Gets the hash of the block that is what we consider "best"
- Definition Classes
- Node → ChainQueryApi
- def getBestHashBlockHeight()(implicit ec: ExecutionContext): Future[Int]
- Definition Classes
- ChainQueryApi
- def getBlockHeight(blockHash: DoubleSha256DigestBE): Future[Option[Int]]
Gets the height of the given block
Gets the height of the given block
- Definition Classes
- Node → ChainQueryApi
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getDataMessageHandler: DataMessageHandler
The current data message handler.
The current data message handler. It should be noted that the dataMessageHandler contains chainstate. When we update with a new chainstate, we need to make sure we update the DataMessageHandler via updateDataMessageHandler() to make sure we don't corrupt our chainstate cache
- def getFilterCount(): Future[Int]
Gets the number of compact filters in the database
Gets the number of compact filters in the database
- Definition Classes
- SpvNode → ChainQueryApi
- def getFiltersBetweenHeights(startHeight: Int, endHeight: Int): Future[Vector[FilterResponse]]
- Definition Classes
- SpvNode → ChainQueryApi
- def getHeightByBlockStamp(blockStamp: BlockStamp): Future[Int]
Returns the block height of the given block stamp
Returns the block height of the given block stamp
- Definition Classes
- SpvNode → ChainQueryApi
- def getMedianTimePast(): Future[Long]
calculates the median time passed
calculates the median time passed
- Definition Classes
- Node → ChainQueryApi
- def getNumberOfConfirmations(blockHashOpt: DoubleSha256DigestBE): Future[Option[Int]]
Gets number of confirmations for the given block hash
Gets number of confirmations for the given block hash
- Definition Classes
- Node → 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 initializePeer(peer: Peer): Future[Unit]
- Definition Classes
- Node
- def isConnected(idx: Int): Future[Boolean]
Checks if we have a tcp connection with our peer
Checks if we have a tcp connection with our peer
- Definition Classes
- Node
- def isDebugEnabled: Boolean
- Attributes
- protected
- Definition Classes
- Logging
- def isDisconnected(idx: Int): Future[Boolean]
- Definition Classes
- Node
- def isErrorEnabled: Boolean
- Attributes
- protected
- Definition Classes
- Logging
- def isInfoEnabled: Boolean
- Attributes
- protected
- Definition Classes
- Logging
- def isInitialized(idx: Int): Future[Boolean]
Checks if we are fully initialized with our peer and have executed the handshake This means we can now send arbitrary messages to our peer
Checks if we are fully initialized with our peer and have executed the handshake This means we can now send arbitrary messages to our peer
- Definition Classes
- Node
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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
- implicit def nodeAppConfig: NodeAppConfig
- def nodeCallbacks: NodeCallbacks
- Definition Classes
- Node
- val nodeConfig: NodeAppConfig
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val peerManager: PeerManager
- def peerMsgSenders: Vector[PeerMessageSender]
- Definition Classes
- Node
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def send(msg: NetworkPayload, idx: Int): Future[Unit]
Sends the given P2P to our peer.
Sends the given P2P to our peer. This method is useful for playing around with P2P messages, therefore marked as
private[node]
.- Definition Classes
- Node
- def setBloomFilter(bloom: BloomFilter): SpvNode
- def start(): Future[SpvNode]
Starts our node
- def stop(): Future[Node]
Stops our node
Stops our node
- Definition Classes
- Node
- def sync(): Future[Unit]
Starts to sync our node with our peer If our local best block hash is the same as our peers we will not sync, otherwise we will keep syncing until our best block hashes match up
Starts to sync our node with our peer If our local best block hash is the same as our peers we will not sync, otherwise we will keep syncing until our best block hashes match up
- Definition Classes
- Node
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- implicit def system: ActorSystem
- 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
- lazy val txDAO: BroadcastAbleTransactionDAO
- Definition Classes
- Node
- def updateBloomFilter(address: BitcoinAddress): Future[SpvNode]
Updates our bloom filter to match the given address
Updates our bloom filter to match the given address
- returns
SPV node with the updated bloom filter
- def updateBloomFilter(transaction: Transaction): Future[SpvNode]
Updates our bloom filter to match the given TX
Updates our bloom filter to match the given TX
- returns
SPV node with the updated bloom filter
- def updateDataMessageHandler(dataMessageHandler: DataMessageHandler): SpvNode
- 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