object BitcoindRpcTestUtil extends BitcoindRpcTestUtil
- Alphabetic
- By Inheritance
- BitcoindRpcTestUtil
- BitcoindRpcTestUtil
- BitcoinSLogger
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- type RpcClientAccum = Builder[BitcoindRpcClient, Vector[BitcoindRpcClient]]
- Definition Classes
- BitcoindRpcTestUtil
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 DEFAULT_LONG_INTERVAL: FiniteDuration
Used for long running async tasks
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- 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
Awaits non-blockingly until the provided clients are connected
- Definition Classes
- BitcoindRpcTestUtil
- def awaitDisconnected(from: BitcoindRpcClient, to: BitcoindRpcClient, interval: FiniteDuration = 100.milliseconds, maxTries: Int = 50)(implicit system: ActorSystem): Future[Unit]
- Definition Classes
- BitcoindRpcTestUtil
- def awaitSameBlockHeight(client1: BitcoindRpcClient, client2: BitcoindRpcClient, interval: FiniteDuration = BitcoindRpcTestUtil.DEFAULT_LONG_INTERVAL, maxTries: Int = 50)(implicit system: ActorSystem): Future[Unit]
- Definition Classes
- BitcoindRpcTestUtil
- def awaitStopped(client: BitcoindRpcClient, interval: FiniteDuration = 100.milliseconds, maxTries: Int = 50)(implicit system: ActorSystem): Future[Unit]
- Definition Classes
- BitcoindRpcTestUtil
- def awaitSynced(client1: BitcoindRpcClient, client2: BitcoindRpcClient, interval: FiniteDuration = BitcoindRpcTestUtil.DEFAULT_LONG_INTERVAL, maxTries: Int = 50)(implicit system: ActorSystem): Future[Unit]
- Definition Classes
- BitcoindRpcTestUtil
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def config(uri: URI, rpcUri: URI, zmqConfig: ZmqConfig, pruneMode: Boolean, blockFilterIndex: Boolean = false): BitcoindConfig
- Definition Classes
- BitcoindRpcTestUtil
- def connectNodes[T <: BitcoindRpcClient](pair: NodePair[T]): Future[Unit]
- Definition Classes
- BitcoindRpcTestUtil
- def connectNodes(first: BitcoindRpcClient, second: BitcoindRpcClient): Future[Unit]
- Definition Classes
- BitcoindRpcTestUtil
- 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
Connects and waits non-blockingly until all the provided pairs of clients are connected
- Definition Classes
- BitcoindRpcTestUtil
- def createNodePair[T <: BitcoindRpcClient](version: BitcoindVersion)(implicit system: ActorSystem): Future[(T, T)]
- Definition Classes
- BitcoindRpcTestUtil
- 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
Returns a pair of BitcoindRpcClient that are connected with some blocks in the chain
- Definition Classes
- BitcoindRpcTestUtil
- 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
Returns a triple of org.bitcoins.rpc.client.common.BitcoindRpcClient BitcoindRpcClient that are connected with some blocks in the chain
- Definition Classes
- BitcoindRpcTestUtil
- 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
Returns a triple of org.bitcoins.rpc.client.common.BitcoindRpcClient BitcoindRpcClient that are connected with some blocks in the chain
- Definition Classes
- BitcoindRpcTestUtil
- def createRawCoinbaseTransaction(sender: BitcoindRpcClient, receiver: BitcoindRpcClient, amount: Bitcoins = Bitcoins(1))(implicit executionContext: ExecutionContext): Future[Transaction]
- Definition Classes
- BitcoindRpcTestUtil
- def createUnconnectedNodePair(clientAccum: RpcClientAccum = Vector.newBuilder)(implicit system: ActorSystem): Future[(BitcoindRpcClient, BitcoindRpcClient)]
Returns a pair of unconnected BitcoindRpcClients with no blocks
Returns a pair of unconnected BitcoindRpcClients with no blocks
- Definition Classes
- BitcoindRpcTestUtil
- 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
Returns a pair of BitcoindRpcClient that are not connected but have the same blocks in the chain
- Definition Classes
- BitcoindRpcTestUtil
- def deleteNodePair(client1: BitcoindRpcClient, client2: BitcoindRpcClient)(implicit executionContext: ExecutionContext): Future[Unit]
Stops the provided nodes and deletes their data directories
Stops the provided nodes and deletes their data directories
- Definition Classes
- BitcoindRpcTestUtil
- def disconnectNodes[T <: BitcoindRpcClient](nodePair: NodePair[T])(implicit system: ActorSystem): Future[Unit]
- Definition Classes
- BitcoindRpcTestUtil
- def disconnectNodes(first: BitcoindRpcClient, second: BitcoindRpcClient)(implicit system: ActorSystem): Future[Unit]
- Definition Classes
- BitcoindRpcTestUtil
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- 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 valueamount
Return index of output of TX
txid
with valueamount
- Definition Classes
- BitcoindRpcTestUtil
- See also
function we're mimicking in Core test suite
- def fundBlockChainTransaction(sender: BitcoindRpcClient, receiver: BitcoindRpcClient, address: BitcoinAddress, amount: Bitcoins)(implicit system: ActorSystem): Future[DoubleSha256DigestBE]
Produces a confirmed transaction from
sender
toaddress
foramount
Produces a confirmed transaction from
sender
toaddress
foramount
- Definition Classes
- BitcoindRpcTestUtil
- def fundMemPoolTransaction(sender: BitcoindRpcClient, address: BitcoinAddress, amount: Bitcoins)(implicit system: ActorSystem): Future[DoubleSha256DigestBE]
Produces a unconfirmed transaction from
sender
toaddress
foramount
Produces a unconfirmed transaction from
sender
toaddress
foramount
- Definition Classes
- BitcoindRpcTestUtil
- 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
- Definition Classes
- BitcoindRpcTestUtil
- 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
- Definition Classes
- BitcoindRpcTestUtil
- def getBinary(version: BitcoindVersion, binaryDirectory: Path = BitcoindRpcTestClient.sbtBinaryDirectory): File
- Definition Classes
- BitcoindRpcTestUtil
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getFirstBlock(node: BitcoindRpcClient)(implicit executionContext: ExecutionContext): Future[GetBlockWithTransactionsResult]
- returns
The first block (after genesis) in the given node's blockchain
- Definition Classes
- BitcoindRpcTestUtil
- 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
Gets an instance of bitcoind with the given version
- Definition Classes
- BitcoindRpcTestUtil
- 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
Gets the pubkey (if it exists) asscociated with a given bitcoin address in a version-agnostic manner
- Definition Classes
- BitcoindRpcTestUtil
- def hasSeenBlock(client1: BitcoindRpcClient, hash: DoubleSha256Digest)(implicit ec: ExecutionContext): Future[Boolean]
- Definition Classes
- BitcoindRpcTestUtil
- def hasSeenBlock(client: BitcoindRpcClient, hash: DoubleSha256DigestBE)(implicit ec: ExecutionContext): Future[Boolean]
Checks whether the provided client has seen the given block hash
Checks whether the provided client has seen the given block hash
- Definition Classes
- BitcoindRpcTestUtil
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- 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 directoryCreates a
bitcoind
instance within the user temporary directory- Definition Classes
- BitcoindRpcTestUtil
- def isConnected[T <: BitcoindRpcClient](nodePair: NodePair[T])(implicit ec: ExecutionContext): Future[Boolean]
- Definition Classes
- BitcoindRpcTestUtil
- def isConnected(first: BitcoindRpcClient, second: BitcoindRpcClient)(implicit ec: ExecutionContext): Future[Boolean]
- Definition Classes
- BitcoindRpcTestUtil
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isNodeAdded[T <: BitcoindRpcClient](nodePair: NodePair[T])(implicit ec: ExecutionContext): Future[Boolean]
- Definition Classes
- BitcoindRpcTestUtil
- def isNodeAdded(first: BitcoindRpcClient, second: BitcoindRpcClient)(implicit ec: ExecutionContext): Future[Boolean]
- Definition Classes
- BitcoindRpcTestUtil
- def logger: Logger
- Definition Classes
- BitcoinSLogger
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- lazy val network: RegTest.type
- Definition Classes
- BitcoindRpcTestUtil
- def newestBitcoindBinary: File
- Definition Classes
- BitcoindRpcTestUtil
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def removeDataDirectory(client: BitcoindRpcClient, interval: FiniteDuration = 100.milliseconds, maxTries: Int = 50)(implicit system: ActorSystem): Future[Unit]
- Definition Classes
- BitcoindRpcTestUtil
- def sendCoinbaseTransaction(sender: BitcoindRpcClient, receiver: BitcoindRpcClient, amount: Bitcoins = Bitcoins(1))(implicit actorSystem: ActorSystem): Future[GetTransactionResult]
- Definition Classes
- BitcoindRpcTestUtil
- 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.- Definition Classes
- BitcoindRpcTestUtil
- Exceptions thrown
RuntimeException
if no versioned BitcoindRpcClient can be constructed.
- def standardConfig: BitcoindConfig
Standard config used for testing purposes
Standard config used for testing purposes
- Definition Classes
- BitcoindRpcTestUtil
- def startServers(servers: Vector[BitcoindRpcClient])(implicit ec: ExecutionContext): Future[Unit]
- Definition Classes
- BitcoindRpcTestUtil
- def startedBitcoindRpcClient(instanceOpt: Option[BitcoindInstanceLocal] = None, clientAccum: RpcClientAccum)(implicit system: ActorSystem): Future[BitcoindRpcClient]
- clientAccum
If provided, the generated client is added to this vectorbuilder.
- Definition Classes
- BitcoindRpcTestUtil
- def stopServer(server: BitcoindRpcClient)(implicit system: ActorSystem): Future[Unit]
Stops the given server and deletes its data directory
Stops the given server and deletes its data directory
- Definition Classes
- BitcoindRpcTestUtil
- def stopServers(servers: Vector[BitcoindRpcClient])(implicit system: ActorSystem): Future[Unit]
Stops the given servers and deletes their data directories
Stops the given servers and deletes their data directories
- Definition Classes
- BitcoindRpcTestUtil
- def syncPairs(pairs: Vector[(BitcoindRpcClient, BitcoindRpcClient)])(implicit system: ActorSystem): Future[Unit]
- Definition Classes
- BitcoindRpcTestUtil
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- 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
- Definition Classes
- BitcoindRpcTestUtil
- 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
- Definition Classes
- BitcoindRpcTestUtil
- 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
- Definition Classes
- BitcoindRpcTestUtil
- 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 waitUntilBlock(blockHeight: Int, client: BitcoindRpcClient, addressForMining: BitcoinAddress)(implicit ec: ExecutionContext): Future[Unit]
Mines blocks until the specified block height.
Mines blocks until the specified block height.
- Definition Classes
- BitcoindRpcTestUtil
- 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 fileCreates a
bitcoind
config within the system temp directory, writes the file and returns the written file- Definition Classes
- BitcoindRpcTestUtil