public class FetchBlock extends Object
Downloads the block given a block hash from the remote or localhost node and prints it out.
When downloading from localhost, run bitcoind locally: bitcoind -testnet -daemon. After bitcoind is up and running, use command: org.bitcoinj.examples.FetchBlock --localhost <blockHash>
Otherwise, use command: org.bitcoinj.examples.FetchBlock <blockHash>, this command will download blocks from a peer generated by DNS seeds.
| Constructor and Description |
|---|
FetchBlock() |
Copyright © 2022. All rights reserved.