mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2024-11-20 10:12:19 +01:00
A library for working with Bitcoin
02416c97fa
The client now has a new CLOSED state, which is entered once a CLOSE has been sent and the close transaction (final contract) has been broadcast onto the P2P network and entered the wallet. Once received, the hash of the close tx is stored in the wallet - the tx is itself already in the wallets spent pool because it connects to the output of the multisig tx. After seeing three confirmations of the close TX the state is deleted from the client wallet for good. Together these changes resolve a bug/design issue in which if a channel was opened, then closed, then another channel was opened but not closed, then a third attempt to connect to the server was made, the client would try to resume the first closed channel. That would fail because the server already deleted its state object and result in new channels being created even though the second could have been resumed. By tracking the fact that the channel was closed, it can be skipped when considering what channel to resume. |
||
---|---|---|
core | ||
examples | ||
misc | ||
tools | ||
wallettemplate | ||
.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. IntelliJ has Maven integration once you tell it where to find your unzipped Maven install directory. Now try running one of the example apps: cd examples mvn exec:java -Dexec.mainClass=com.google.bitcoin.examples.ForwardingService <insert a bitcoin address here> It will download the block chain and eventually print a Bitcoin address. If you send coins to it, it will forward them on to the address you specified. Now you are ready to follow the tutorial: https://code.google.com/p/bitcoinj/wiki/GettingStarted