Commit Graph

93 Commits

Author SHA1 Message Date
Christian Basler 2a8834e3c6 Timeout might have been too short for Travis CI
(or there is an actual problem with concurrency)
2015-10-30 20:05:55 +01:00
Christian Basler c9c0806e0d Attempt to disconnect on thread interrupt 2015-10-29 12:34:29 +01:00
Christian Basler bdc8e025c1 Connections are now severed after a configurable time (12h by default) or when a limit is exceeded (150 by default) 2015-10-24 12:08:23 +02:00
Christian Basler a398b072b5 (probably) fixed another concurrency problem in the tests 2015-10-19 15:14:25 +02:00
Christian Basler ac70a4b632 We probably shouldn't leave the bitmessage node running after the test is finished 2015-10-15 17:59:32 +02:00
Christian Basler 4913a21b11 Fixed NetworkHandlerTest 2015-10-15 15:34:04 +02:00
Christian Basler 511b3c1754 Connections now use two separate threads for writing and listening
- this should avoid dead locks, specifically when connecting to Jabit :/
- also, Java 8 features are now allowed in modules not needed by Android clients
2015-10-14 18:37:43 +02:00
Christian Basler 117ac3ca73 Fixed some problems and added cleanup on shutdown 2015-10-12 12:44:13 +02:00
Christian Basler ea1419eda1 Synchronisation API - added option to wait for the synchronization to finish 2015-10-08 13:12:39 +02:00
Christian Basler f9ff22bebe Synchronisation API and related refactorings / improvements
-> lets you synchronize with the Bitmessage network without staying connected
2015-10-07 21:50:41 +02:00
Christian Basler c3fdee79ca Some bugfixes and added findMessages by sender 2015-09-29 07:13:27 +02:00
Christian Basler 7fb837645f Synchronisation now shouldn't fail if the trusted host has no new messages
- fixed tests for Gradle builds
- fixed SerializationTest
2015-09-25 23:35:31 +02:00
Christian Basler d67c932fb2 Added synchronization code and unit test.
Synchronisation fails if the trusted host has no new messages - this needs to be fixed (but shouldn't be an issue for real world applications)
2015-09-24 08:09:20 +02:00
Christian Basler f89d1a342e Fixed a few problems:
- some bugs that creeped in when I moved security into its own adapter
- improved some DB code as it doesn't work in Android anyway
- all entities should be serializable (very useful in Android)
2015-08-28 13:48:01 +02:00
Christian Basler b8546e28af Moving "Security" to a separate port, so there can be a Bouncycastle and a Spongycastle implementation. (BC doesn't work on Android, SC can't be used on Oracle's JVM) 2015-08-05 19:52:18 +02:00
Christian Basler 7f4c67f43e Removing IV of received objects from requested objects list (I forgot that one) 2015-07-03 07:56:18 +02:00
Christian Basler 2c4d95af2f smarter network code, fixed various issues
- deciding on the stream at creation time is just silly - it should be done based on the identities (this part is TODO)
- changed NodeRegistry so it doesn't store nodes - this should help to connect faster
- inventory items shouldn't be advertised to nodes that are already aware of them (issue #13)
- objects shouldn't be requested more than once (issue #9)
2015-07-01 06:57:30 +02:00
Christian Basler 884171fe18 issue #15: fixed socket timeouts and connection shutdown - no exceptions should be thrown if the network node is being shut down, although it can take up to 5 seconds = max(READ_TIMEOUT, CONNECT_TIMEOUT) 2015-06-24 22:56:17 +02:00
Christian Basler fefefe6809 Added some stuff necessary to publish to maven central - I hope it still builds on travis 2015-06-21 08:58:49 +02:00
Christian Basler 72d0fbe550 Version 0.1.0 bump
Updated Gradle file structure so the version and a few other things are only defined once
2015-06-18 21:26:08 +02:00
Christian Basler 6be8d51f6d Distributable JAR build
- connection manager should now be rock stable
- does try to create new connections as long as there are less than eight active connections, which might result in more than eight outgoing connections, but this shouldn't be a problem
- some minor improvements and bug fixes
2015-06-18 13:41:11 +02:00
Christian Basler 1dc4582012 Issue # 5: fixed test and initialisation 2015-06-17 06:23:00 +02:00
Christian Basler 9b0de83706 Issue # 5: initialize node repository if there are no nodes in DB 2015-06-17 06:00:03 +02:00
Christian Basler c0a7acc609 Greatly improved network code - the "manage the node repository" part of issue #5 should now be OK 2015-06-16 06:41:59 +02:00
Christian Basler ed0d1c2911 issue #4: prevent connections to self, select random nodes to connect to 2015-06-13 17:37:55 +02:00
Christian Basler bd5bf76904 Improved connection management, preventing multiple connections to the same node, and improved broadcast handling. 2015-06-12 06:57:20 +02:00
Christian Basler b4683bba68 Broadcasts. Receiving seems to work, but there still seems to be a problem with sending them. 2015-06-09 22:45:24 +02:00
Christian Basler 274c16b748 Implemented sending messages (and fixed a few bugs on the way)
This closes issue #3
2015-05-29 13:17:00 +02:00
Christian Basler c7542e438f Ignore this test - it's pointless anyway 2015-05-26 17:54:04 +02:00
Christian Basler f0d4f3f81f Updated version to 0.0.1 (I don't know why 1.0 is default for new projects/modules) 2015-05-26 17:30:45 +02:00
Christian Basler 245ca22743 Updated documentation, added German translation 2015-05-24 21:55:37 +02:00
Christian Basler b793526f2f Inventory items are now saved only if processing didn't fail. Receiving messages works, but there seems to be a problem with the POW check in some circumstances. 2015-05-23 10:27:05 +02:00
Christian Basler 1fbc4a1d74 Major refactoring 2015-05-19 19:16:20 +02:00
Christian Basler a65907f13b Some work on addresses and private keys that still doesn't work. As a side effect, sending objects now works basically. 2015-05-01 17:14:43 +02:00
Christian Basler 00bd6a08b7 Added SerializationTest for object payload (which is probably the most important) 2015-04-28 18:36:07 +02:00
Christian Basler f00c6018e7 Some refactoring
- I didn't like the way the context was initialized
- The DatabaseRepository got too complicated
2015-04-24 11:11:08 +02:00
Christian Basler 51c1ecfd41 Minor refactoring
I think having the read method in the same place as the write method might help preventing some errors
There are some people who are strictly against using static methods. I suppose I'm not experienced enough yet.
2015-04-18 16:44:00 +02:00
Christian Basler e611e5e20a More or less properly shutdown client / network node 2015-04-17 13:01:46 +02:00
Christian Basler 32de01bbf5 Some basics seem to work now like storing messages, addresses, inventory vectors etc. 2015-04-14 19:47:53 +02:00
Christian Basler 35088ca033 Network code now works well enough for the server to think it successfully established a connection 2015-04-07 18:48:58 +02:00
Christian Basler 3299d8ca4a Networking code, untested 2015-04-06 10:01:03 +02:00
Christian Basler 0c4b39bdee It's now possible to send a 'version' message that will be accepted by the other node. 2015-03-31 21:06:42 +02:00
Christian Basler caf66ea9a5 Some basic entities and project structure 2015-03-20 14:18:29 +01:00