trait BitcoindRpcTestUtil extends BitcoinSLogger

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BitcoindRpcTestUtil
  2. BitcoinSLogger
  3. AnyRef
  4. 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 awaitStopped(client: BitcoindRpcClient, interval: FiniteDuration = 100.milliseconds, maxTries: Int = 50)(implicit system: ActorSystem): Future[Unit]
  9. def awaitSynced(client1: BitcoindRpcClient, client2: BitcoindRpcClient, interval: FiniteDuration = BitcoindRpcTestUtil.DEFAULT_LONG_INTERVAL, maxTries: Int = 50)(implicit system: ActorSystem): Future[Unit]
  10. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  11. def config(uri: URI, rpcUri: URI, zmqConfig: ZmqConfig, pruneMode: Boolean, blockFilterIndex: Boolean = false): BitcoindConfig
  12. def connectNodes[T <: BitcoindRpcClient](pair: NodePair[T]): Future[Unit]
  13. def connectNodes(first: BitcoindRpcClient, second: BitcoindRpcClient): Future[Unit]
  14. 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

  15. def createNodePair[T <: BitcoindRpcClient](version: BitcoindVersion)(implicit system: ActorSystem): Future[(T, T)]
  16. def createNodePair[T <: BitcoindRpcClient](clientAccum: RpcClientAccum = Vector.newBuilder)(implicit system: ActorSystem): Future[(BitcoindRpcClient, BitcoindRpcClient)]

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

  17. def createNodeTriple[T <: BitcoindRpcClient](version: BitcoindVersion)(implicit system: ActorSystem): Future[(T, T, T)]

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

  18. def createNodeTriple(clientAccum: RpcClientAccum)(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

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

    Returns a pair of unconnected BitcoindRpcClients with no blocks

  21. def createUnconnectedNodePairWithBlocks[T <: BitcoindRpcClient](clientAccum: RpcClientAccum = Vector.newBuilder)(implicit system: ActorSystem): Future[(BitcoindRpcClient, BitcoindRpcClient)]

    Returns a pair of BitcoindRpcClient that are not connected but have the same blocks in the chain

  22. def deleteNodePair(client1: BitcoindRpcClient, client2: BitcoindRpcClient)(implicit executionContext: ExecutionContext): Future[Unit]

    Stops the provided nodes and deletes their data directories

  23. def disconnectNodes[T <: BitcoindRpcClient](nodePair: NodePair[T])(implicit system: ActorSystem): Future[Unit]
  24. def disconnectNodes(first: BitcoindRpcClient, second: BitcoindRpcClient)(implicit system: ActorSystem): Future[Unit]
  25. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  27. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  28. 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

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

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

    Produces a unconfirmed transaction from sender to address for amount

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

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

  33. def getBinary(version: BitcoindVersion, binaryDirectory: Path = BitcoindRpcTestClient.sbtBinaryDirectory): File
  34. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  35. def getFirstBlock(node: BitcoindRpcClient)(implicit executionContext: ExecutionContext): Future[GetBlockWithTransactionsResult]

    returns

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

  36. def getInstance(bitcoindVersion: BitcoindVersion, port: Int = RpcUtil.randomPort, rpcPort: Int = RpcUtil.randomPort, zmqConfig: ZmqConfig = RpcUtil.zmqConfig, pruneMode: Boolean = false, binaryDirectory: Path = BitcoindRpcTestClient.sbtBinaryDirectory)(implicit system: ActorSystem): BitcoindInstanceLocal

    Gets an instance of bitcoind with the given version

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

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

    Checks whether the provided client has seen the given block hash

  40. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  41. def instance(port: Int = RpcUtil.randomPort, rpcPort: Int = RpcUtil.randomPort, zmqConfig: ZmqConfig = RpcUtil.zmqConfig, pruneMode: Boolean = false, versionOpt: Option[BitcoindVersion] = None, binaryDirectory: Path = BitcoindRpcTestClient.sbtBinaryDirectory, enableNeutrino: Boolean = true)(implicit system: ActorSystem): BitcoindInstanceLocal

    Creates a bitcoind instance within the user temporary directory

  42. def isConnected[T <: BitcoindRpcClient](nodePair: NodePair[T])(implicit ec: ExecutionContext): Future[Boolean]
  43. def isConnected(first: BitcoindRpcClient, second: BitcoindRpcClient)(implicit ec: ExecutionContext): Future[Boolean]
  44. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  45. def isNodeAdded[T <: BitcoindRpcClient](nodePair: NodePair[T])(implicit ec: ExecutionContext): Future[Boolean]
  46. def isNodeAdded(first: BitcoindRpcClient, second: BitcoindRpcClient)(implicit ec: ExecutionContext): Future[Boolean]
  47. def logger: Logger
    Definition Classes
    BitcoinSLogger
  48. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  49. lazy val network: RegTest.type
  50. def newestBitcoindBinary: File
  51. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  52. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  53. def removeDataDirectory(client: BitcoindRpcClient, interval: FiniteDuration = 100.milliseconds, maxTries: Int = 50)(implicit system: ActorSystem): Future[Unit]
  54. def sendCoinbaseTransaction(sender: BitcoindRpcClient, receiver: BitcoindRpcClient, amount: Bitcoins = Bitcoins(1))(implicit actorSystem: ActorSystem): Future[GetTransactionResult]
  55. 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.

  56. def standardConfig: BitcoindConfig

    Standard config used for testing purposes

  57. def startServers(servers: Vector[BitcoindRpcClient])(implicit ec: ExecutionContext): Future[Unit]
  58. def startedBitcoindRpcClient(instanceOpt: Option[BitcoindInstanceLocal] = None, clientAccum: RpcClientAccum)(implicit system: ActorSystem): Future[BitcoindRpcClient]

    clientAccum

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

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

    Stops the given server and deletes its data directory

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

    Stops the given servers and deletes their data directories

  61. def syncPairs(pairs: Vector[(BitcoindRpcClient, BitcoindRpcClient)])(implicit system: ActorSystem): Future[Unit]
  62. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  63. def toString(): String
    Definition Classes
    AnyRef → Any
  64. def v26Instance(port: Int = RpcUtil.randomPort, rpcPort: Int = RpcUtil.randomPort, zmqConfig: ZmqConfig = RpcUtil.zmqConfig, pruneMode: Boolean = false, binaryDirectory: Path = BitcoindRpcTestClient.sbtBinaryDirectory)(implicit system: ActorSystem): BitcoindInstanceLocal
  65. def v27Instance(port: Int = RpcUtil.randomPort, rpcPort: Int = RpcUtil.randomPort, zmqConfig: ZmqConfig = RpcUtil.zmqConfig, pruneMode: Boolean = false, binaryDirectory: Path = BitcoindRpcTestClient.sbtBinaryDirectory)(implicit system: ActorSystem): BitcoindInstanceLocal
  66. def v28Instance(port: Int = RpcUtil.randomPort, rpcPort: Int = RpcUtil.randomPort, zmqConfig: ZmqConfig = RpcUtil.zmqConfig, pruneMode: Boolean = false, binaryDirectory: Path = BitcoindRpcTestClient.sbtBinaryDirectory)(implicit system: ActorSystem): BitcoindInstanceLocal
  67. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  68. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  69. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  70. def waitUntilBlock(blockHeight: Int, client: BitcoindRpcClient, addressForMining: BitcoinAddress)(implicit ec: ExecutionContext): Future[Unit]

    Mines blocks until the specified block height.

  71. def writtenConfig(uri: URI, rpcUri: URI, zmqConfig: ZmqConfig, 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 AnyRef

Inherited from Any

Ungrouped