Packages

trait BitcoindRpcTestUtil extends BitcoinSLogger

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BitcoindRpcTestUtil
  2. BitcoinSLogger
  3. Logging
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. type RpcClientAccum = Builder[BitcoindRpcClient, Vector[BitcoindRpcClient]]

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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def awaitConnection(from: BitcoindRpcClient, to: BitcoindRpcClient, interval: FiniteDuration = 100.milliseconds, maxTries: Int = 50)(implicit system: ActorSystem): Future[Unit]

    Awaits non-blockingly until the provided clients are connected

  6. def awaitDisconnected(from: BitcoindRpcClient, to: BitcoindRpcClient, interval: FiniteDuration = 100.milliseconds, maxTries: Int = 50)(implicit system: ActorSystem): Future[Unit]
  7. def awaitSameBlockHeight(client1: BitcoindRpcClient, client2: BitcoindRpcClient, interval: FiniteDuration = BitcoindRpcTestUtil.DEFAULT_LONG_INTERVAL, maxTries: Int = 50)(implicit system: ActorSystem): Future[Unit]
  8. def awaitSynced(client1: BitcoindRpcClient, client2: BitcoindRpcClient, interval: FiniteDuration = BitcoindRpcTestUtil.DEFAULT_LONG_INTERVAL, maxTries: Int = 50)(implicit system: ActorSystem): Future[Unit]
  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  10. def config(uri: URI, rpcUri: URI, zmqPort: Int, pruneMode: Boolean, blockFilterIndex: Boolean = false): BitcoindConfig
  11. def connectPairs(pairs: Vector[(BitcoindRpcClient, BitcoindRpcClient)])(implicit system: ActorSystem): Future[Unit]

    Connects and waits non-blockingly until all the provided pairs of clients are connected

  12. def createNodePair(clientAccum: RpcClientAccum = Vector.newBuilder)(implicit system: ActorSystem): Future[(BitcoindRpcClient, BitcoindRpcClient)]

    Returns a pair of BitcoindRpcClient that are connected with some blocks in the chain

  13. def createNodePairV16(clientAccum: RpcClientAccum = Vector.newBuilder)(implicit system: ActorSystem): Future[(BitcoindV16RpcClient, BitcoindV16RpcClient)]

    Returns a pair of BitcoindV16RpcClient that are connected with some blocks in the chain

  14. def createNodePairV17(clientAccum: RpcClientAccum = Vector.newBuilder)(implicit system: ActorSystem): Future[(BitcoindV17RpcClient, BitcoindV17RpcClient)]

    Returns a pair of BitcoindV17RpcClient that are connected with some blocks in the chain

  15. def createNodePairV18(clientAccum: RpcClientAccum = Vector.newBuilder)(implicit system: ActorSystem): Future[(BitcoindV18RpcClient, BitcoindV18RpcClient)]

    Returns a pair of BitcoindV18RpcClient that are connected with some blocks in the chain

  16. def createNodePairV19(clientAccum: RpcClientAccum = Vector.newBuilder)(implicit system: ActorSystem): Future[(BitcoindV19RpcClient, BitcoindV19RpcClient)]

    Returns a pair of BitcoindV19RpcClient that are connected with some blocks in the chain

  17. def createNodeTriple(clientAccum: RpcClientAccum = Vector.newBuilder)(implicit system: ActorSystem): Future[(BitcoindRpcClient, BitcoindRpcClient, BitcoindRpcClient)]

    Returns a triple of org.bitcoins.rpc.client.common.BitcoindRpcClient BitcoindRpcClient that are connected with some blocks in the chain

  18. def createNodeTripleV17(clientAccum: RpcClientAccum = Vector.newBuilder)(implicit system: ActorSystem): Future[(BitcoindV17RpcClient, BitcoindV17RpcClient, BitcoindV17RpcClient)]

    returns

    a triple of BitcoindV17RpcClient that are connected with some blocks in the chain

  19. def createNodeTripleV18(clientAccum: RpcClientAccum = Vector.newBuilder)(implicit system: ActorSystem): Future[(BitcoindV18RpcClient, BitcoindV18RpcClient, BitcoindV18RpcClient)]
  20. def createNodeTripleV19(clientAccum: RpcClientAccum = Vector.newBuilder)(implicit system: ActorSystem): Future[(BitcoindV19RpcClient, BitcoindV19RpcClient, BitcoindV19RpcClient)]
  21. def createRawCoinbaseTransaction(sender: BitcoindRpcClient, receiver: BitcoindRpcClient, amount: Bitcoins = Bitcoins(1))(implicit executionContext: ExecutionContext): Future[Transaction]
  22. def createUnconnectedNodePair(clientAccum: RpcClientAccum = Vector.newBuilder)(implicit system: ActorSystem): Future[(BitcoindRpcClient, BitcoindRpcClient)]

    Returns a pair of unconnected BitcoindRpcClients with no blocks

  23. def debug(mkr: Marker, msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  24. def debug(msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  25. def debug(msg: => Any): Unit
    Attributes
    protected
    Definition Classes
    Logging
  26. def deleteNodePair(client1: BitcoindRpcClient, client2: BitcoindRpcClient)(implicit executionContext: ExecutionContext): Future[Unit]

    Stops the provided nodes and deletes their data directories

  27. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  29. def error(mkr: Marker, msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  30. def error(msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  31. def error(msg: => Any): Unit
    Attributes
    protected
    Definition Classes
    Logging
  32. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  33. def findOutput(client: BitcoindRpcClient, txid: DoubleSha256DigestBE, amount: Bitcoins, blockhash: Option[DoubleSha256DigestBE] = None)(implicit executionContext: ExecutionContext): Future[UInt32]

    Return index of output of TX txid with value amount

    Return index of output of TX txid with value amount

    See also

    function we're mimicking in Core test suite

  34. def fundBlockChainTransaction(sender: BitcoindRpcClient, receiver: BitcoindRpcClient, address: BitcoinAddress, amount: Bitcoins)(implicit system: ActorSystem): Future[DoubleSha256DigestBE]

    Produces a confirmed transaction from sender to address for amount

  35. def fundMemPoolTransaction(sender: BitcoindRpcClient, address: BitcoinAddress, amount: Bitcoins)(implicit system: ActorSystem): Future[DoubleSha256DigestBE]

    Produces a unconfirmed transaction from sender to address for amount

  36. def generateAllAndSync(clients: Vector[BitcoindRpcClient], blocks: Int = 6)(implicit system: ActorSystem): Future[Vector[Vector[DoubleSha256DigestBE]]]

    Generates the specified amount of blocks with all provided clients and waits until they are synced.

    Generates the specified amount of blocks with all provided clients and waits until they are synced.

    returns

    Vector of Blockhashes of generated blocks, with index corresponding to the list of provided clients

  37. def generateAndSync(clients: Vector[BitcoindRpcClient], blocks: Int = 6)(implicit system: ActorSystem): Future[Vector[DoubleSha256DigestBE]]

    Generates the specified amount of blocks and waits until the provided clients are synced.

    Generates the specified amount of blocks and waits until the provided clients are synced.

    returns

    Blockhashes of generated blocks

  38. def getBinary(version: BitcoindVersion): File
  39. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  40. def getFirstBlock(node: BitcoindRpcClient)(implicit executionContext: ExecutionContext): Future[GetBlockWithTransactionsResult]

    returns

    The first block (after genesis) in the given node's blockchain

  41. def getPubkey(client: BitcoindRpcClient, address: BitcoinAddress)(implicit system: ActorSystem): Future[Option[ECPublicKey]]

    Gets the pubkey (if it exists) asscociated with a given bitcoin address in a version-agnostic manner

  42. def hasSeenBlock(client1: BitcoindRpcClient, hash: DoubleSha256Digest)(implicit ec: ExecutionContext): Future[Boolean]
  43. def hasSeenBlock(client: BitcoindRpcClient, hash: DoubleSha256DigestBE)(implicit ec: ExecutionContext): Future[Boolean]

    Checks whether the provided client has seen the given block hash

  44. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  45. def info(mkr: Marker, msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  46. def info(msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  47. def info(msg: => Any): Unit
    Attributes
    protected
    Definition Classes
    Logging
  48. def instance(port: Int = RpcUtil.randomPort, rpcPort: Int = RpcUtil.randomPort, zmqPort: Int = RpcUtil.randomPort, pruneMode: Boolean = false, versionOpt: Option[BitcoindVersion] = None): BitcoindInstance

    Creates a bitcoind instance within the user temporary directory

  49. def isDebugEnabled: Boolean
    Attributes
    protected
    Definition Classes
    Logging
  50. def isErrorEnabled: Boolean
    Attributes
    protected
    Definition Classes
    Logging
  51. def isInfoEnabled: Boolean
    Attributes
    protected
    Definition Classes
    Logging
  52. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  53. def isTraceEnabled: Boolean
    Attributes
    protected
    Definition Classes
    Logging
  54. def isWarnEnabled: Boolean
    Attributes
    protected
    Definition Classes
    Logging
  55. def logger: Logger
    Attributes
    protected
    Definition Classes
    Logging
  56. def loggerName: String
    Attributes
    protected
    Definition Classes
    Logging
  57. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  58. lazy val network: RegTest.type
  59. def newestBitcoindBinary: File
  60. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  61. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  62. def sendCoinbaseTransaction(sender: BitcoindRpcClient, receiver: BitcoindRpcClient, amount: Bitcoins = Bitcoins(1))(implicit actorSystem: ActorSystem): Future[GetTransactionResult]
  63. def signRawTransaction(signer: BitcoindRpcClient, transaction: Transaction, utxoDeps: Vector[SignRawTransactionOutputParameter] = Vector.empty): Future[SignRawTransactionResult]

    Bitcoin Core 0.16 and 0.17 has diffrent APIs for signing raw transactions.

    Bitcoin Core 0.16 and 0.17 has diffrent APIs for signing raw transactions. This method tries to construct either a BitcoindV16RpcClient or a BitcoindV16RpcClient from the provided signer, and then calls the appropriate method on the result.

    Exceptions thrown

    RuntimeException if no versioned BitcoindRpcClient can be constructed.

  64. def standardConfig: BitcoindConfig

    Standard config used for testing purposes

  65. def startServers(servers: Vector[BitcoindRpcClient])(implicit ec: ExecutionContext): Future[Unit]
  66. def startedBitcoindRpcClient(instance: BitcoindInstance = BitcoindRpcTestUtil.instance(), clientAccum: RpcClientAccum = Vector.newBuilder)(implicit system: ActorSystem): Future[BitcoindRpcClient]

    clientAccum

    If provided, the generated client is added to this vectorbuilder.

  67. def stopServer(server: BitcoindRpcClient)(implicit system: ActorSystem): Future[Unit]

    Stops the given server and deletes its data directory

  68. def stopServers(servers: Vector[BitcoindRpcClient])(implicit system: ActorSystem): Future[Unit]

    Stops the given servers and deletes their data directories

  69. def syncPairs(pairs: Vector[(BitcoindRpcClient, BitcoindRpcClient)])(implicit system: ActorSystem): Future[Unit]
  70. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  71. def tmpDir(): File
  72. def toString(): String
    Definition Classes
    AnyRef → Any
  73. def trace(mkr: Marker, msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  74. def trace(msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  75. def trace(msg: => Any): Unit
    Attributes
    protected
    Definition Classes
    Logging
  76. def v16Instance(port: Int = RpcUtil.randomPort, rpcPort: Int = RpcUtil.randomPort, zmqPort: Int = RpcUtil.randomPort, pruneMode: Boolean = false): BitcoindInstance
  77. def v17Instance(port: Int = RpcUtil.randomPort, rpcPort: Int = RpcUtil.randomPort, zmqPort: Int = RpcUtil.randomPort, pruneMode: Boolean = false): BitcoindInstance
  78. def v18Instance(port: Int = RpcUtil.randomPort, rpcPort: Int = RpcUtil.randomPort, zmqPort: Int = RpcUtil.randomPort, pruneMode: Boolean = false): BitcoindInstance
  79. def v19Instance(port: Int = RpcUtil.randomPort, rpcPort: Int = RpcUtil.randomPort, zmqPort: Int = RpcUtil.randomPort, pruneMode: Boolean = false): BitcoindInstance
  80. def vExperimentalInstance(port: Int = RpcUtil.randomPort, rpcPort: Int = RpcUtil.randomPort, zmqPort: Int = RpcUtil.randomPort, pruneMode: Boolean = false): BitcoindInstance
  81. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  82. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  83. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  84. def waitUntilBlock(blockHeight: Int, client: BitcoindRpcClient, addressForMining: BitcoinAddress)(implicit ec: ExecutionContext): Future[Unit]

    Mines blocks until the specified block height.

  85. def warn(mkr: Marker, msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  86. def warn(msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  87. def warn(msg: => Any): Unit
    Attributes
    protected
    Definition Classes
    Logging
  88. def writtenConfig(uri: URI, rpcUri: URI, zmqPort: Int, pruneMode: Boolean, blockFilterIndex: Boolean = false): Path

    Creates a bitcoind config within the system temp directory, writes the file and returns the written file

Inherited from BitcoinSLogger

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped