com.google.bitcoin.examples
Class PingService

java.lang.Object
  extended by com.google.bitcoin.examples.PingService

public class PingService
extends Object

PingService demonstrates basic usage of the library. It sits on the network and when it receives coins, simply sends them right back to the previous owner, determined rather arbitrarily by the address of the first input.

If running on TestNet (slow but better than using real coins on prodnet) do the following:

  1. Backup your current wallet.dat in case of unforeseen problems
  2. Start your bitcoin client in test mode bitcoin -testnet. This will create a new sub-directory called testnet and should not interfere with normal wallets or operations.
  3. (Optional) Choose a fresh address
  4. (Optional) Visit the Testnet faucet (https://testnet.freebitcoins.appspot.com/) to load your client with test coins
  5. Run PingService -testnet
  6. Wait for the block chain to download
  7. Send some coins from your bitcoin client to the address provided in the PingService console
  8. Leave it running until you get the coins back again

The testnet can be slow or flaky as it's a shared resource. You can use the testnet in a box to do everything purely locally.


Constructor Summary
PingService()
           
 
Method Summary
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PingService

public PingService()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception


Copyright © 2011. All Rights Reserved.