Interface BlockChainEnvironment
- All Known Implementing Classes:
RegTestEnvironment
public interface BlockChainEnvironment
Abstraction(s) to help reuse tests between RegTest mode and TestNet or MainNet
RegTest mode implementation will generate blocks when waitForBlocks() is called.
Other implementations will actually wait for blocks to be confirmed.
-
Method Summary
Modifier and TypeMethodDescriptionList
<org.bitcoinj.base.Sha256Hash> Wait for (and possible *hasten*) the creation of a single blockList
<org.bitcoinj.base.Sha256Hash> waitForBlocks
(int numBlocks) Wait for (and possible *hasten*) the creation of blocks
-
Method Details
-
waitForBlock
Wait for (and possible *hasten*) the creation of a single block- Returns:
- A list with a single block hash
- Throws:
Exception
-
waitForBlocks
Wait for (and possible *hasten*) the creation of blocks- Parameters:
numBlocks
- the number of blocks to wait for- Returns:
- A list of block hashes
- Throws:
Exception
-