Packages

case class SpvNode(nodePeer: Vector[Peer], dataMessageHandler: DataMessageHandler, nodeConfig: NodeAppConfig, chainConfig: ChainAppConfig, actorSystem: ActorSystem) extends Node with Product with Serializable

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SpvNode
  2. Serializable
  3. Product
  4. Equals
  5. Node
  6. P2PLogger
  7. Logging
  8. ChainQueryApi
  9. NodeApi
  10. AnyRef
  11. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new SpvNode(nodePeer: Vector[Peer], dataMessageHandler: DataMessageHandler, nodeConfig: NodeAppConfig, chainConfig: ChainAppConfig, actorSystem: ActorSystem)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val actorSystem: ActorSystem
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def bloomFilter: BloomFilter
  7. 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
  8. def broadcastTransactions(transactions: Vector[Transaction]): Future[Unit]

    Broadcasts the given transaction over the P2P network

    Broadcasts the given transaction over the P2P network

    Definition Classes
    NodeNodeApi
  9. 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
  10. def chainAppConfig: ChainAppConfig
    Definition Classes
    SpvNodeNode
  11. val chainConfig: ChainAppConfig
  12. lazy val 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
  13. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  14. val controlMessageHandler: ControlMessageHandler
    Definition Classes
    SpvNodeNode
  15. val dataMessageHandler: DataMessageHandler
  16. def debug(mkr: Marker, msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  17. def debug(msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  18. def debug(msg: => Any): Unit
    Attributes
    protected
    Definition Classes
    Logging
  19. def downloadBlocks(blockHashes: Vector[DoubleSha256Digest]): Future[Unit]

    Fetches the given blocks from the peers and calls the appropriate callbacks when done.

    Fetches the given blocks from the peers and calls the appropriate callbacks when done.

    Definition Classes
    NodeNodeApi
  20. 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
    NodeChainQueryApi
  21. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. def error(mkr: Marker, msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  23. def error(msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  24. def error(msg: => Any): Unit
    Attributes
    protected
    Definition Classes
    Logging
  25. implicit def executionContext: ExecutionContext
    Definition Classes
    Node
  26. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  27. 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
    NodeChainQueryApi
  28. def getBestHashBlockHeight()(implicit ec: ExecutionContext): Future[Int]
    Definition Classes
    ChainQueryApi
  29. def getBlockHeight(blockHash: DoubleSha256DigestBE): Future[Option[Int]]

    Gets the height of the given block

    Gets the height of the given block

    Definition Classes
    NodeChainQueryApi
  30. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  31. 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

    Definition Classes
    SpvNodeNode
  32. def getFilterCount(): Future[Int]

    Gets the number of compact filters in the database

    Gets the number of compact filters in the database

    Definition Classes
    SpvNodeChainQueryApi
  33. def getFiltersBetweenHeights(startHeight: Int, endHeight: Int): Future[Vector[FilterResponse]]
    Definition Classes
    SpvNodeChainQueryApi
  34. 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
    SpvNodeChainQueryApi
  35. 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
    NodeChainQueryApi
  36. def info(mkr: Marker, msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  37. def info(msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  38. def info(msg: => Any): Unit
    Attributes
    protected
    Definition Classes
    Logging
  39. 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
  40. def isDebugEnabled: Boolean
    Attributes
    protected
    Definition Classes
    Logging
  41. def isDisconnected(idx: Int): Future[Boolean]
    Definition Classes
    Node
  42. def isErrorEnabled: Boolean
    Attributes
    protected
    Definition Classes
    Logging
  43. def isInfoEnabled: Boolean
    Attributes
    protected
    Definition Classes
    Logging
  44. 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
  45. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  46. def isTraceEnabled: Boolean
    Attributes
    protected
    Definition Classes
    Logging
  47. def isWarnEnabled: Boolean
    Attributes
    protected
    Definition Classes
    Logging
  48. def logger: Logger
    Attributes
    protected
    Definition Classes
    Logging
  49. def loggerName: String
    Attributes
    protected
    Definition Classes
    Logging
  50. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  51. implicit def nodeAppConfig: NodeAppConfig
    Definition Classes
    SpvNodeNode
  52. def nodeCallbacks: NodeCallbacks
    Definition Classes
    Node
  53. val nodeConfig: NodeAppConfig
  54. val nodePeer: Vector[Peer]
  55. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  56. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  57. lazy val peerMsgSenders: Vector[PeerMessageSender]
    Definition Classes
    Node
  58. def peerServices: Map[Peer, ServiceIdentifier]
    Definition Classes
    Node
  59. val peers: Vector[Peer]
    Definition Classes
    SpvNodeNode
  60. def productElementNames: Iterator[String]
    Definition Classes
    Product
  61. def randomPeerMsgSender: PeerMessageSender
    Definition Classes
    Node
  62. def randomPeerMsgSenderWithCompactFilters: PeerMessageSender
    Definition Classes
    Node
  63. def randomPeerMsgSenderWithService(f: (ServiceIdentifier) => Boolean): PeerMessageSender
    Definition Classes
    Node
  64. 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
  65. def setBloomFilter(bloom: BloomFilter): SpvNode
  66. def setPeerServices(peer: Peer, serviceIdentifier: ServiceIdentifier): Unit
    Definition Classes
    Node
  67. def start(): Future[SpvNode]

    Starts our node

    Starts our node

    Definition Classes
    SpvNodeNode
  68. def stop(): Future[Node]

    Stops our node

    Stops our node

    Definition Classes
    Node
  69. 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
  70. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  71. implicit def system: ActorSystem
    Definition Classes
    SpvNodeNode
  72. def trace(mkr: Marker, msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  73. def trace(msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  74. def trace(msg: => Any): Unit
    Attributes
    protected
    Definition Classes
    Logging
  75. lazy val txDAO: BroadcastAbleTransactionDAO
    Definition Classes
    Node
  76. 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

  77. 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

  78. def updateDataMessageHandler(dataMessageHandler: DataMessageHandler): SpvNode
    Definition Classes
    SpvNodeNode
  79. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  80. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  81. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  82. def warn(mkr: Marker, msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  83. def warn(msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  84. def warn(msg: => Any): Unit
    Attributes
    protected
    Definition Classes
    Logging

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Node

Inherited from P2PLogger

Inherited from Logging

Inherited from ChainQueryApi

Inherited from NodeApi

Inherited from AnyRef

Inherited from Any

Ungrouped