mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2024-11-20 18:22:12 +01:00
A library for working with Bitcoin
5de80dfedf
This ensures that when user provided event listeners are invoked, we're not holding any locks at that time and thus event listeners can do whatever they want with no risk of accidental inversions or deadlocks. A utility method is available to wait for all preceding events that were triggered to complete, which is useful for unit tests. Reimplement how balance futures work in order to avoid the wallet registering an event handler on itself, this means you cannot accidentally deadlock yourself by running getBalanceFuture().get() inside an event listener. Future changes will modify how transaction confidence listeners are run to work the same way, and make other kinds of event listener run in the user code thread as well. The user code mechanism is usable with any executor, opening up the possibility of automatically relaying event listeners into GUI threads for some kinds of apps. |
||
---|---|---|
core | ||
examples | ||
misc | ||
tools | ||
.gitattributes | ||
.gitignore | ||
AUTHORS | ||
COPYING | ||
pom.xml | ||
README |
To get started, ensure you have the latest JDK installed, and download Maven from: http://maven.apache.org/ Then run "mvn clean package" to compile the software. You can also run "mvn site:site" to generate a website with useful information like JavaDocs. The outputs are under the target/ directory. Alternatively, just import the project using your IDE. Most good ones have Maven integration. Now try running one of the example apps: cd examples mvn exec:java -Dexec.mainClass=com.google.bitcoin.examples.PingService It will download the block chain and eventually print a Bitcoin address. If you send coins to it, you should get them back a few minutes later when a block is solved. Now you are ready to follow the tutorial: https://code.google.com/p/bitcoinj/wiki/GettingStarted