Package | Description |
---|---|
org.bitcoinj.core |
The core package contains classes for network messages like
Block and
Transaction , peer connectivity via PeerGroup ,
block chain management and the Wallet class. |
org.bitcoinj.jni | |
org.bitcoinj.params |
Network parameters encapsulate some of the differences between different Bitcoin networks such as the main/production
network, the testnet, regtest mode, unit testing params and so on.
|
org.bitcoinj.testing |
Various utilities for writing unit tests: also useful for testing your own code and apps that build on top of
bitcoinj.
|
org.bitcoinj.utils |
Formatting monetary amounts, representing exchange rates, a program for loading Bitcoin Core saved block files,
a class to control how bitcoinj uses threads and misc other utility classes that don't fit anywhere else.
|
Modifier and Type | Field and Description |
---|---|
protected Block |
NetworkParameters.genesisBlock |
Modifier and Type | Method and Description |
---|---|
Block |
Block.cloneAsHeader()
Returns a copy of the block, but without any transactions.
|
Block |
Block.createNextBlock(Address to) |
Block |
Block.createNextBlock(Address to,
Coin value) |
Block |
Block.createNextBlock(Address to,
long time)
Returns a solved block that builds on top of this one.
|
Block |
Block.createNextBlock(Address to,
TransactionOutPoint prevOut) |
Block |
Block.createNextBlockWithCoinbase(byte[] pubKey,
Coin coinbaseValue) |
Block |
FilteredBlock.getBlockHeader()
Gets a copy of the block header
|
Block |
NetworkParameters.getGenesisBlock()
Genesis block for this chain.
|
Block |
StoredBlock.getHeader()
The block header this object wraps.
|
Block |
AbstractBlockChain.getOrphanRoot(Sha256Hash from)
An orphan block is one that does not connect to the chain anywhere (ie we can't find its parent, therefore
it's an orphan).
|
Modifier and Type | Method and Description |
---|---|
ListenableFuture<Block> |
Peer.getBlock(Sha256Hash blockHash)
Asks the connected peer for the block of the given hash, and returns a future representing the answer.
|
List<Block> |
HeadersMessage.getBlockHeaders() |
Modifier and Type | Method and Description |
---|---|
boolean |
AbstractBlockChain.add(Block block)
Processes a received block and tries to add it to the chain.
|
void |
InventoryMessage.addBlock(Block block) |
protected StoredBlock |
FullPrunedBlockChain.addToBlockStore(StoredBlock storedPrev,
Block block) |
protected StoredBlock |
BlockChain.addToBlockStore(StoredBlock storedPrev,
Block blockHeader) |
protected abstract StoredBlock |
AbstractBlockChain.addToBlockStore(StoredBlock storedPrev,
Block block)
Adds/updates the given
Block with the block store. |
protected StoredBlock |
FullPrunedBlockChain.addToBlockStore(StoredBlock storedPrev,
Block header,
TransactionOutputChanges txOutChanges) |
protected StoredBlock |
BlockChain.addToBlockStore(StoredBlock storedPrev,
Block blockHeader,
TransactionOutputChanges txOutChanges) |
protected abstract StoredBlock |
AbstractBlockChain.addToBlockStore(StoredBlock storedPrev,
Block header,
TransactionOutputChanges txOutputChanges)
Adds/updates the given
StoredBlock with the block store. |
FilteredBlock |
BloomFilter.applyAndUpdate(Block block)
Creates a new FilteredBlock from the given Block, using this filter to select transactions.
|
StoredBlock |
StoredBlock.build(Block block)
Creates a new StoredBlock, calculating the additional fields by adding to the values in this block.
|
protected TransactionOutputChanges |
FullPrunedBlockChain.connectTransactions(int height,
Block block) |
protected TransactionOutputChanges |
BlockChain.connectTransactions(int height,
Block block) |
protected abstract TransactionOutputChanges |
AbstractBlockChain.connectTransactions(int height,
Block block)
Connect each transaction in block.transactions, verifying them as we go and removing spent outputs
If an error is encountered in a transaction, no changes should be made to the underlying BlockStore.
|
void |
PeerEventListener.onBlocksDownloaded(Peer peer,
Block block,
int blocksLeft)
Called on a Peer thread when a block is received.
|
void |
DownloadListener.onBlocksDownloaded(Peer peer,
Block block,
int blocksLeft) |
void |
AbstractPeerEventListener.onBlocksDownloaded(Peer peer,
Block block,
int blocksLeft) |
Constructor and Description |
---|
FilteredBlock(NetworkParameters params,
Block header,
PartialMerkleTree pmt) |
HeadersMessage(NetworkParameters params,
Block... headers) |
StoredBlock(Block header,
BigInteger chainWork,
int height) |
Modifier and Type | Method and Description |
---|---|
void |
NativePeerEventListener.onBlocksDownloaded(Peer peer,
Block block,
int blocksLeft) |
Modifier and Type | Method and Description |
---|---|
Block |
RegTestParams.getGenesisBlock() |
Modifier and Type | Field and Description |
---|---|
Block |
FakeTxBuilder.BlockPair.block |
Modifier and Type | Method and Description |
---|---|
static Block |
FakeTxBuilder.makeSolvedTestBlock(Block prev,
Address to,
Transaction... transactions) |
static Block |
FakeTxBuilder.makeSolvedTestBlock(BlockStore blockStore,
Address coinsTo) |
static Block |
FakeTxBuilder.makeSolvedTestBlock(Block prev,
Transaction... transactions) |
Modifier and Type | Method and Description |
---|---|
static Block |
FakeTxBuilder.makeSolvedTestBlock(Block prev,
Address to,
Transaction... transactions) |
static Block |
FakeTxBuilder.makeSolvedTestBlock(Block prev,
Transaction... transactions) |
Modifier and Type | Method and Description |
---|---|
Block |
BlockFileLoader.next() |
Modifier and Type | Method and Description |
---|---|
Iterator<Block> |
BlockFileLoader.iterator() |
Copyright © 2014. All rights reserved.