Commit Graph

743 Commits

Author SHA1 Message Date
Chris Beams
57f2b43845
Extract isSuccess(BaseFuture) method into util class 2014-11-06 16:57:41 +01:00
Manfred Karrer
1dde1f361f Use compatible version with latest TomP2P lib 2014-11-06 16:43:09 +01:00
Manfred Karrer
e4743ca469 Merge remote-tracking branch 'origin/master' 2014-11-06 16:41:28 +01:00
Manfred Karrer
7faff2d244 Use latest TomP2P verison 2014-11-06 16:41:22 +01:00
Chris Beams
000302d29e
Merge branch 'master'
Conflicts:
	src/main/java/io/bitsquare/gui/main/trade/offerbook/OfferBook.java
	src/main/java/io/bitsquare/msg/TomP2PMessageFacade.java
2014-11-06 14:32:31 +01:00
Chris Beams
e201bf88ce
Rename i.b.network.{BootstrapNode=>BootstrapNodes} 2014-11-06 14:00:36 +01:00
Chris Beams
36b3b82e52
Refactor Node from interface to value type
The modeling of BootstrapNode as an enum implementing the Node interface
became awkward, requiring an ugly, package-private 'NodeImpl' class and
other problems.

This change eliminates NodeImpl, refactors Node from being an interface
to being a value type [1,2], and refactors BootstrapNode from being an
enum to being an interface (the #all method there takes the place of
what was the enum's inherited #values method). This is slightly more
verbose in the end than being modeled as an enum, but in the end, we
were never using BootstrapNode as an enum (e.g., never used in switch
statements or == equality comparisons, etc).

[1]: http://blog.joda.org/2014/03/valjos-value-java-objects.html
[2]: http://docs.oracle.com/javase/8/docs/api/java/lang/doc-files/ValueBased.html
2014-11-06 13:52:59 +01:00
Chris Beams
640a736ec3
Repeat TomP2PTests tests using @Repeat vs. loops 2014-11-06 13:17:54 +01:00
Chris Beams
1a92b05bf4
Introduce @Repeat and RepeatRule for repeatable @Test methods
With thanks to original author Frank Appel (@fappel)

See:
 - https://gist.github.com/fappel/8bcb2aea4b39ff9cfb6e
 - http://www.codeaffine.com/2013/04/10/running-junit-tests-repeatedly-without-loops/
2014-11-06 13:17:28 +01:00
Chris Beams
8b6f0ac64e
Refactor TomP2PTests
- Introduce use of Node abstraction for concision
 - Use to BootstrapNode#LOCALHOST and #DIGITAL_OCEAN1 vs. repeating info
 - Make all configuration variables static and final constants
2014-11-06 13:17:28 +01:00
Chris Beams
655100e69f
Introduce Node#at static factory and NodeTests 2014-11-06 11:25:52 +01:00
Chris Beams
1f136de1a1
Apply consistent style to argument help text 2014-11-06 11:25:51 +01:00
Chris Beams
da163bcc97
Introduce io.bitsquare.network.Node#DEFAULT_PORT 2014-11-06 11:25:51 +01:00
Chris Beams
ce5155ebdc
Rename BootstrapNode#{LOCAL_HOST => LOCALHOST} 2014-11-06 11:24:31 +01:00
Chris Beams
1ea30fb4ae
Clarify concept of 'default network' in BitcoinModule 2014-11-06 11:24:31 +01:00
Manfred Karrer
c7524edef3 Add bootstrap info to splash screen, user final wehn possible, cleanup 2014-11-06 09:21:53 +01:00
Chris Beams
aeaef72834
Remove offer creation recovery from CreateOfferCoordinator
Recovery was never fully implemented, and removing it dramatically
simplifies things. We can return to this with a proper analysis of
finite state machine libraries when the time comes.
2014-11-06 08:43:38 +01:00
Chris Beams
72423dce8a
Remove unused MessageFacade from CreateOfferCoordinator 2014-11-06 08:43:38 +01:00
Chris Beams
40d7da8d10
Inline BroadCastOfferFeeTx#run into CreateOfferCoordinator 2014-11-06 08:43:38 +01:00
Chris Beams
2adac9475e
Inline CreateOfferFeeTx#run into CreateOfferCoordinator 2014-11-06 08:43:37 +01:00
Chris Beams
7fffa81f02
Replace VerifyOffer class with Offer#validate method 2014-11-06 08:43:37 +01:00
Chris Beams
b3670c5201
Inline CreateOfferCoordinator#onFailed 2014-11-06 08:43:36 +01:00
Chris Beams
45a4bf7c09
Rename methods used to implement *Handler lambdas 2014-11-06 08:43:36 +01:00
Chris Beams
44dc76e07e
Rename *Handler methods 2014-11-06 08:43:36 +01:00
Chris Beams
f72bdf5f71
Move generic *Handler types to new util.task package 2014-11-06 08:43:35 +01:00
Chris Beams
aac4731f80
Replace AddOfferListener Result/Fault handlers
This change begins the process of simplifying the trade protocol by
eliminating extra callback layers such as AddOfferListener and task
layers such as PublishOfferToDHT in favor of calling directly into
Repository interfaces.
2014-11-06 08:43:35 +01:00
Chris Beams
40807b07f8
Introduce OfferRepository interface and TomP2P impl
This change begins the process of breaking up the monolithic
MessageFacade abstraction into smaller, cohesive Repositories (in the
Domain-Driven Design sense of the word) that abstract callers away from
networking details.

It also begins the process of restructuring the msg.listeners package,
such that individual *Listener interfaces are co-located with their
respective Repositories
2014-11-06 08:43:34 +01:00
Manfred Karrer
dbbe7cec49 Extract isSuccess in P2PNode, set custom log levels 2014-11-05 23:15:36 +01:00
Manfred Karrer
399842d8e2 Extract isSuccess to a method and return always true to ignore a bug from TomP2P (isSuccess returns always false) 2014-11-05 22:12:48 +01:00
Manfred Karrer
df3a507066 Change polling from 1 sec to 3 sec, refactorings 2014-11-05 22:00:55 +01:00
Manfred Karrer
4fb8030a43 Add loops, add extra SeedNode class, remove LanTest class 2014-11-05 20:41:34 +01:00
Manfred Karrer
bcaa8b9946 Fix random ports 2014-11-05 17:02:26 +01:00
Manfred Karrer
96f8a6c281 Use @Ignore 2014-11-05 16:47:12 +01:00
Manfred Karrer
ef68e08b50 Fix return value 2014-11-05 16:44:59 +01:00
Manfred Karrer
c8a470fb7b Add test with pong reply 2014-11-05 16:20:07 +01:00
Manfred Karrer
25be5bdbe1 Finished tests for localhost case 2014-11-05 15:37:27 +01:00
Manfred Karrer
afe7ec295b Add shutdown method 2014-11-05 15:09:37 +01:00
Manfred Karrer
879c5ca244 Use @Ignore for class, add Put test 2014-11-05 15:06:04 +01:00
Manfred Karrer
5533be6e57 Rename to TomP2PTests, add logs 2014-11-05 14:59:59 +01:00
Manfred Karrer
6c1c1056bb Merge remote-tracking branch 'origin/master' 2014-11-05 14:45:57 +01:00
Manfred Karrer
7fa631dfde Refactor tests (WIP) 2014-11-05 14:45:50 +01:00
Richard Myers
d83f657248 removed path to javapackager for windows
path to javapackager.exe should already be set via system %PATH% - it
could be either of %programfiles% or %programfiles(x86)% so better to
have no path prepended and use default.
2014-11-05 13:43:43 +01:00
Manfred Karrer
c0524120e2 Use Localhost and regtest as default, cleanup seednode 2014-11-05 13:30:49 +01:00
Manfred Karrer
e665c7ebd1 Remove ServerID as default 2014-11-05 13:26:47 +01:00
Manfred Karrer
8b468f58cf Changed to protected 2014-11-05 02:39:53 +01:00
Manfred Karrer
3a1b84ce50 Add localhost 2014-11-05 02:19:08 +01:00
Manfred Karrer
ab45d2aee0 Add missing icon 2014-11-05 02:15:11 +01:00
Manfred Karrer
28b6e0ad9d WIP 2014-11-05 02:05:42 +01:00
Manfred Karrer
58da80ca2d Add bootstrapping methods 2014-11-05 02:05:42 +01:00
Manfred Karrer
568e2782dd Merge pull request #255 from bitsquare/organize
Organize codebase for acyclic modularity
2014-11-05 02:01:27 +01:00