Commit Graph

391 Commits

Author SHA1 Message Date
Miron Cuperman
92398d2c47 Check whether Peer should stop after each message.
Buffering could cause a delay in stopping if we only depend on socket
being closed.

Resolves issue 161.
2012-03-26 12:17:48 -07:00
Mike Hearn
a77d071d35 Catch exceptions thrown during signature checking. Some versions of Android cannot reliably check ECDSA signatures! Resolves issue 160. 2012-03-26 15:39:10 +02:00
Miron Cuperman
58971b6728 Throw an exception rather than assert on trying to get from address of generation transaction 2012-03-23 16:58:06 -07:00
Miron Cuperman
91a5949930 Additional level of locking to work around Android issue
Resolves issue 153.
2012-03-23 13:44:19 -07:00
Miron Cuperman
4f0c10bd2d Expose correct version message.
Resolve issue 158.
2012-03-23 12:57:47 -07:00
Miron Cuperman
576650142c Lock in BOBS on creation, do not swallow non-IO exceptions 2012-03-23 12:53:54 -07:00
Miron Cuperman
4b1c32584f Lock BlockStore files to prevent concurrent access.
Resolves issue 153.
2012-03-23 10:53:54 -07:00
Miron Cuperman
7f6d636cec Expose several useful Peer fields, for issue 158. 2012-03-19 09:40:17 -07:00
Mike Hearn
a119286b29 POM changes and refactorings from Gary. 2012-03-16 13:20:50 +01:00
Mike Hearn
6e162057c1 Removed IML files from git. 2012-03-13 19:00:33 +01:00
Mike Hearn
0e52c98c45 Use the standard Maven directory layout, rename "lib" to "core". Mavenize submodules. 2012-03-13 18:57:03 +01:00
Mike Hearn
216deb2d35 Re-organize the source tree so people can depend on bitcoinj without pulling in the examples, tools, or dependencies thereof. 2012-03-11 20:01:12 +01:00
Mike Hearn
a86ca77a58 Move to 0.5-SNAPSHOT 2012-03-09 15:34:34 +01:00
Mike Hearn
74b2f6c172 Update version number to 0.4 from 0.4-SNAPSHOT. Remove the TODO file. Sync contributors list in the POM with the AUTHORS file. 2012-03-09 15:33:04 +01:00
Mike Hearn
2e319dec90 Fire onCoinsSent/Received from commitTx() so it is called when using sendCoins[Async]. Resolves issue 154. 2012-03-07 14:45:12 +01:00
Miron Cuperman
bb97da6a5a Fix race condition on PeerGroup shutdown.
peers can be null in handlePeerDeath if we are shutting down.
Remove redundant numPeers() - use numConnectedPeers().
Rename getPeers() to getConnectedPeers()

Resolves issue 147.
2012-03-06 12:49:45 -08:00
Miron Cuperman
789798bae0 Serialize key creation time.
Resolves issue 151.
2012-03-03 14:00:05 -08:00
Mike Hearn
0d195e17c8 Lower the priority of the PeerGroup thread and daemonize it. 2012-03-02 15:32:58 +01:00
Mike Hearn
0b20b47c0c Clear another FindBugs warning in PeerGroup. 2012-03-02 15:24:20 +01:00
Mike Hearn
32a2be53c4 Make adding/removing event listeners lock PeerGroup. Take out use of synchronizedList as it's redundant. Resolves issue 148. 2012-03-02 15:15:36 +01:00
Mike Hearn
31463c506f Use EventListenerInvoker in PeerGroup, and clear a FindBugs warning about an unlocked access to the running property. 2012-03-02 15:08:55 +01:00
Mike Hearn
b25446271a Synchronize on event listeners in EventListenerInvoker. 2012-03-02 15:08:36 +01:00
Mike Hearn
001afa9ae2 Print TX values in Wallet.toString() 2012-03-01 18:56:12 +01:00
Mike Hearn
0a473a8d76 Remove an unnecessary save point in ToyWallet. 2012-03-01 18:56:02 +01:00
Mike Hearn
40bd728703 Add a Transaction.getValue(Wallet) method. 2012-03-01 18:55:46 +01:00
Mike Hearn
ddb6da155b Merge branch 'master' of https://code.google.com/p/bitcoinj 2012-03-01 18:07:30 +01:00
Miron Cuperman
feb85a13d3 Remove private key from ECKey.toString and put it in toStringWithPrivate 2012-02-29 14:50:57 -08:00
Mike Hearn
1df679cd17 Change how wallet callbacks are run in the case of a tx that both sends and receives coins from the wallet (common case). 2012-02-24 15:25:38 +01:00
Mike Hearn
c8e76a8f9b Log slow reads in BOBS. 2012-02-24 15:25:06 +01:00
Jim Burton
812ca60b9b BIP21 bitcoin URI implementation.
Resolves issue 143.
2012-02-23 11:29:48 -08:00
Mike Hearn
168a5a40e1 Fix a minor bug in the ChainSplitTests 2012-02-19 15:04:02 +01:00
Mike Hearn
54a2a71460 Replace WalletEventListener.onDeadTransaction with a generic confidence changed callback, this simplifies the case of listening for all confidence changes in all wallet transactions and gives a single place to save the wallet from. 2012-02-19 15:01:30 +01:00
Mike Hearn
68424281c5 Print out alert messages to the log. 2012-02-19 12:22:43 +01:00
Mike Hearn
0e198e68e8 Add top 50 blocks to the block locator. Should make chain split handling more robust. 2012-02-13 23:39:23 +01:00
Mike Hearn
2f72eb64d7 Note that there is a race in MockNetworkConnection. Fixing it will have to wait until I am less tired. 2012-02-13 23:32:14 +01:00
Mike Hearn
e8548a197c Make Message inner exception class static, for efficiency. Clears a FindBugs warning. 2012-02-13 23:03:15 +01:00
Mike Hearn
cbf60e1056 Clamp the blocksLeft parameter of the PeerEventListener.onBlocksDownloaded() callback to zero. It was being set from the difference between chain height and peer advertised chain height, which can legitimately be negative, but this is confusing and resulted in a bug in DownloadListener which could cause it to never correctly flag the end of chain download. Resolves issue 86. 2012-02-13 22:02:13 +01:00
Mike Hearn
5fde54e8e3 Add an initVerbose() method to BriefLogFormatter. Note: this does not actually appear to work :( 2012-02-13 21:36:49 +01:00
Mike Hearn
57d518aba9 Fix an issue in block chain handling, whereby a duplicate block received that was not the chain head could result in wallet corruption and bogus "block forks the chain" messages. Resolves issue 135. 2012-02-13 21:36:09 +01:00
Mike Hearn
a70c868f3f Update the README to use correct capitalization of Bitcoin and reference the wallet-tool script. 2012-02-13 20:48:26 +01:00
Mike Hearn
1d772a059f Add a little shell script that invokes WalletTool via maven. 2012-02-13 20:48:05 +01:00
Mike Hearn
5bc9e49941 Lower the level of a spammy log line. 2012-02-13 20:47:52 +01:00
Mike Hearn
d08f2f7808 WalletTool: allow specification of debug levels and force a particular peer to be used. Add a bit of logging to WalletTool itself. 2012-02-13 20:47:32 +01:00
Mike Hearn
2c93dfba32 More JavaDocs for PeerAddress and default the port for the prodnet rather than zero, which is pretty useless. 2012-02-13 20:46:42 +01:00
Mike Hearn
1204a901e6 Make the semaphore in DownloadListener private 2012-02-13 20:46:14 +01:00
Mike Hearn
dec8d5aeb8 Fix a minor bug in Peer.java where it wasn't always correctly constructing the block locator. Resolves issue 138. Bug found by Vasile Rotaru. 2012-02-12 22:41:03 +01:00
Mike Hearn
cfd06195a0 WalletTool: allow control of logging from the command line. Change how block chain download is waited for. 2012-02-12 22:25:09 +01:00
Mike Hearn
11dcb0a682 Log chain height in BlockChain c'tor 2012-02-12 22:25:09 +01:00
Miron Cuperman
af826772c5 Fast shutdown for PeerGroup.
Concurrency safe peerDiscoverers

Resolves issue 118.
2012-02-10 09:09:56 -08:00
Mike Hearn
6597f01874 Handle the not-enough-funds case in sendCoinsAsync and sendCoins(PeerGroup ...). They got a NPE in this case during a recent refactoring. Resolves issue 136. 2012-02-10 17:00:29 +01:00