Commit Graph

363 Commits

Author SHA1 Message Date
Mike Hearn
623389a156 Address comments from Miron and Andreas:
- Make GetBlocksMessage/GetHeadersMessage implement toString/hashCode
- Minor comment/naming fixes
- > not >= for comparing fast catchup time to block header
- Return current time in Wallet.getEarliestKeyCreationTime() rather than throw an exception when there are no keys in the wallet.
2012-01-09 11:57:08 +01:00
Miron Cuperman
247a07a3ab Prepare Derby for merging 2012-01-05 16:04:37 -08:00
Miron Cuperman
826f2d2c51 Small cleanup and optimization for Derby store 2012-01-05 16:04:37 -08:00
Miron Cuperman
cf824dfbce Make unit test genesis block pass verification 2012-01-05 16:04:37 -08:00
Miron Cuperman
b7b1c039dc Cleanup and finish merge with 0.3 2012-01-05 16:04:37 -08:00
Miron Cuperman (devrandom)
f731c8591d Commit every 2 seconds instead of after every write 2012-01-05 16:04:37 -08:00
Miron Cuperman
075602aafd Apache Derby backed BlockStore, and a matching PingService
Conflicts:

	src/com/google/bitcoin/core/DiskBlockStore.java
2012-01-05 16:04:37 -08:00
Mike Hearn
dd2be6eeb4 Make ECKey store its creation time. Implement fast catchup using the getheaders command. You can now set a date on a Peer/PeerGroup, before which block bodies will not be fetched. After that they will. Using the date of the earliest key in the wallet means new users can get started faster and with less battery drain as they aren't parsing blocks that are guaranteed to have no relevant transactions. 2011-12-29 23:52:08 +00:00
Mike Hearn
da10e0ca69 Update TODO file. 2011-12-29 20:27:45 +00:00
Mike Hearn
1a107952b9 Reformatting of comments to 120 cols. 2011-12-29 13:32:54 +00:00
Mike Hearn
1b5252fd61 Fix a bug that could cause transactions to not move from the unspent to spent maps (efficiency issue but not a correctness issue). Add change outputs to the fake transactions created by TestUtils to reveal the issue and add more pool size tests. Resolves issue 89. 2011-12-27 23:40:45 +00:00
Mike Hearn
57d26107de Delete a fairly useless unit test that was also non-deterministic. 2011-12-27 23:27:52 +00:00
Mike Hearn
234090e5a6 Add numPeers() and getPeers() accessors to PeerGroup. Resolves issue 106. 2011-12-27 12:04:49 +00:00
Mike Hearn
b9a141a96b Update DNS seeds list. 2011-12-17 01:14:52 +01:00
Mike Hearn
31d22fc0e7 Merge remote-tracking branch 'origin/master'
Conflicts:
	src/com/google/bitcoin/core/AlertMessage.java
2011-12-16 14:30:36 +01:00
Mike Hearn
464b528175 Set length field to fix a unit test. 2011-12-16 14:30:01 +01:00
Mike Hearn
10c936c601 Support parsing and signature checking of alert messages. Very basic support, checking for version matches and relaying can come later. 2011-12-16 14:25:41 +01:00
Mike Hearn
3aafe80d99 Add a readByteArray() convenience method to Message, and simplify readVarInt. 2011-12-16 14:25:17 +01:00
Mike Hearn
ea05f640ef Print the exception stack trace in BriefLogFormatter. 2011-12-16 14:24:37 +01:00
Mike Hearn
a67909bebf Don't throw an exception when parsing an unknown message type. 2011-12-16 14:24:03 +01:00
Mike Hearn
7774bf4aa4 Remove an unnecessary import. 2011-12-16 14:23:33 +01:00
Miron Cuperman
3d45b4b4a9 Fix HeadersMessage.parseLite . 2011-12-07 15:03:51 -08:00
Mike Hearn
457ef5f318 Add HeadersMessage and parsing support for it. Patch from Roman Mandeleil. 2011-12-05 18:35:10 +01:00
Mike Hearn
525d5e8d55 Switch to JDK logging and add a simple formatter that is more concise than the default Java one. 2011-11-25 16:56:35 +00:00
Mike Hearn
74aae43f43 Switch to JDK logging and add a simple formatter that is more concise than the default Java one. 2011-11-25 16:55:22 +00:00
Mike Hearn
6491f3a048 Bump version to 0.4-SNAPSHOT, switch the subVer field to use genjixs BIP 14 format. 2011-11-25 14:14:00 +00:00
Mike Hearn
39ccbb595c Correct typo in the POM file. 2011-11-25 14:04:10 +00:00
Mike Hearn
8809872a32 Set version to 0.3 in the version message 2011-11-25 14:03:55 +00:00
Mike Hearn
a2f0cb54a7 POM for 0.3 release 2011-11-25 11:37:29 +00:00
Mike Hearn
00cb8a4abd Make bitcoinSerialize() return a copy by default, provide an unsafeBitcoinSerialize() method for high performance applications that are willing to deal with the extra API complexity. 2011-11-25 10:12:29 +00:00
Mike Hearn
9549d345a7 Delete some dead code. 2011-11-25 09:58:21 +00:00
Mike Hearn
5561ffcb90 Remove SpeedTest as it's not generally useful to have in the test suite. 2011-11-25 09:56:50 +00:00
Mike Hearn
57077a71ae Minor comment reformatting, dead code elimination. 2011-11-25 09:38:04 +00:00
Miron Cuperman (devrandom)
83354a34e6 Improve locking in PeerGroup. Do not use shutdownNow. Resolves issue 93 2011-11-13 00:02:03 +00:00
Miron Cuperman (devrandom)
4b268872df Make decodeCompactBits public, resolves issue 99. 2011-11-12 23:32:17 +00:00
Miron Cuperman (devrandom)
3a463e4799 Cleanup of lazy block parsing, patch from shadders 2011-11-12 23:20:04 +00:00
Miron Cuperman (devrandom)
dff3b2b45a Implement ReverseDwordBytes. Resolves issue 100 2011-10-31 17:28:01 +00:00
Miron Cuperman (devrandom)
a88bb0bc1c Notify even if nothing to download, resolves issue 90 2011-10-28 18:46:43 +00:00
Miron Cuperman (devrandom)
415f8e611c Fix another Java-6ism 2011-10-27 17:51:34 +00:00
Mike Hearn
65205b2655 Remove javadocs from repo, they are available at javadoc.bitcoinj.org instead. 2011-10-26 12:16:12 +00:00
Mike Hearn
794facc727 Dump out versions and chain heights in PrintPeers. 2011-10-24 15:54:53 +00:00
Mike Hearn
6cbe07c935 Fix a bug that could cause multiple peers to think they were download peers. It wasn't revealed by the unit tests because of how peers are added there vs when using discovery. That's now been changed so the tests are closer to reality. 2011-10-24 15:54:25 +00:00
Mike Hearn
5fceeb7794 Add units to the TCPNetworkConnection connectTimeout[Msec] parameter. 2011-10-24 15:53:25 +00:00
Mike Hearn
55273576cf Don't inform the API user of peer disconnects or select a new download peer when a PeerGroup is being terminated. Fixes issue 95. 2011-10-24 12:44:26 +00:00
Miron Cuperman (devrandom)
7a834cad6e Fix another Java-6ism 2011-10-24 04:39:35 +00:00
Miron Cuperman (devrandom)
82070afd24 Fix PeerGroup.setMaxConnections for values less than 4. Resolve issue 97 2011-10-24 02:24:03 +00:00
Miron Cuperman (devrandom)
b7065f3f32 Remove stray line causing a compile error on Java 5 2011-10-24 02:23:21 +00:00
Mike Hearn
0cec27e5a7 Some changes to PeerGroup and how we manage the download process:
- Have a dominant peer that is responsible for all data downloads. This eliminates the case of multiple threads fighting over download of the block chain and wasting time/bandwidth duplicating work.
- Make NetworkConnection an interface with two implementations: {TCP,Mock}NetworkConnection
- Rewrite the Peer/PeerGroup tests to use the mock connection. This simplifies testing of multiple independent peer threads within the same group.
- Switch off the MOBILE_OPTIMIZED mode as it's no longer required. It may still be useful for the multiplexing proxy project.
2011-10-21 13:13:33 +00:00
Mike Hearn
0c5408e7c6 Reformat the file. 2011-10-21 09:58:30 +00:00
Mike Hearn
d2e4284930 Improve the block locator we send to remote peers as a temporary hack for the lack of exponential thinning. Patch from Jan. Updates issue 84. 2011-10-21 09:57:59 +00:00