Commit Graph

610 Commits

Author SHA1 Message Date
Manfred Karrer
3033a19b46 Change default port, Add ip to args, pass namespace to messageModule 2014-11-08 16:28:49 +01:00
Manfred Karrer
d72d7299df Add missing RepeatRule, Simplify SeedNodeForTesting 2014-11-07 18:33:59 +01:00
Manfred Karrer
8cfdf1907e Use server seed node and testnet 2014-11-07 18:28:43 +01:00
Manfred Karrer
232a208a03 Revert to 0.12 as 0.12.1 has changes in the Coin class 2014-11-07 17:28:59 +01:00
Manfred Karrer
222cda53d1 Add IPv4 filter 2014-11-07 16:07:13 +01:00
Manfred Karrer
182218612e Update to bitcoinJ 12.1 2014-11-07 16:04:56 +01:00
Manfred Karrer
9e69822a40 Improve Splash screen info, Refactor WalletFacade (user executor, gui defines Platform.runlater as executor) 2014-11-07 16:03:14 +01:00
Manfred Karrer
7dd61b35f6 Use Localhost 2014-11-07 13:47:55 +01:00
Manfred Karrer
089be0ca16 Use compatible version with latest TomP2P lib 2014-11-07 00:58:24 +01:00
Manfred Karrer
7049ab3a78 Fix broken preferences path 2014-11-07 00:17:21 +01:00
Chris Beams
5d56dc62c9
Merge branch 'wip-cbeams'
Additional changes during the process of isolating TomP2P. High-level
changes include:

 - Beginning to break up the monolithic MessageFacade into modular
   repository classes, starting with the OfferRepository interface and
   its TomP2P implementation

 - Major refactoring of the CreateOfferCoordinator class, eliminating
   the never-completely-implemented resume logic. This class still needs
   quite a bit of work, but it's now considerably simpler than it was

 - Refactoring the Node and BootstrapNode types for greater clarity and
   ease of use

 - Most classes that use the net.tomp2p API have been moved into tomp2p
   subpackages, e.g. io.bitsquare.offer.tomp2p. Classes within have been
   made package private wherever possible.

 - The Guice module structure has evolved. For example, note the
   relationship between offer.OfferModule and offer.tomp2p.TomP2POfferModule,
   and note how the latter is consumed by app.AppModule. This arrangement
   provides for clear contracts as to what is required to assemble a
   functioning Bitsquare application, while allowing implementation-specific
   modules to be swapped in and out with ease and still allowing
   implementation-specific classes to remain package-private.

See extended commit comments for further details.

* wip-cbeams:
  Rename io.bitsquare.{Abstract=>}BitsquareModule
  Move io.bitsquare.{network=>util}.tomp2p.BaseFutureUtil
  Introduce app.gui.MainModule
  Optimize imports
  Introduce io.bitsquare.msg.tomp2p package
  Introduce io.bitsquare.offer.tomp2p package
  Extract isSuccess(BaseFuture) method into util class
  Remove offer creation recovery from CreateOfferCoordinator
  Remove unused MessageFacade from CreateOfferCoordinator
  Inline BroadCastOfferFeeTx#run into CreateOfferCoordinator
  Inline CreateOfferFeeTx#run into CreateOfferCoordinator
  Replace VerifyOffer class with Offer#validate method
  Inline CreateOfferCoordinator#onFailed
  Rename methods used to implement *Handler lambdas
  Rename *Handler methods
  Move generic *Handler types to new util.task package
  Replace AddOfferListener Result/Fault handlers
  Introduce OfferRepository interface and TomP2P impl
2014-11-06 17:05:01 +01:00
Chris Beams
ca070941dc
Rename io.bitsquare.{Abstract=>}BitsquareModule 2014-11-06 16:58:29 +01:00
Chris Beams
1546285b8b
Move io.bitsquare.{network=>util}.tomp2p.BaseFutureUtil 2014-11-06 16:58:28 +01:00
Chris Beams
486cd9824e
Introduce app.gui.MainModule 2014-11-06 16:58:23 +01:00
Chris Beams
21098afd45
Optimize imports 2014-11-06 16:58:22 +01:00
Chris Beams
96fa93f608
Introduce io.bitsquare.msg.tomp2p package 2014-11-06 16:58:20 +01:00
Chris Beams
467f76fd76
Introduce io.bitsquare.offer.tomp2p package 2014-11-06 16:57:42 +01:00
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