Commit graph

5293 commits

Author SHA1 Message Date
Chris Beams
1760fccc89
Move io.bisq.core.network.{* => .p2p.seed.*}
Prior to this change, the contents of io.bisq.core.network were in fact
all seednode-related, and the main public type in this package,
DefaultSeedNodeRepository, is an implementation of
io.bisq.network.p2p.seed.SeedNodeRepository. This repackaging makes
better reflects these facts, making it more obvious to the unitiated
what this package is all about, and preserving the unqualified
io.bisq.core.network package for future expansion into non-seednode
related areas.
2018-02-21 10:45:21 +01:00
Chris Beams
08ca7ee0f9
Sort static factory methods at bottom 2018-02-21 10:45:21 +01:00
Chris Beams
fb856aea95
Favor public visibility for non-private members of package-private types
Public members of package-private classes are in effect still
package-private. Leaving the public modifier in place on these members
(as opposed to marking all members package-private) is beneficial for
two reasons:

 1. It leaves these members looking "normal" to the trained Java eye.
Readers are not left wondering why constructors and methods are
package-private. They can notice, if and when appropriate, that the
class itself is package-private, and can understand the transitive
visibility of each member on that basis.  Otherwise, the class is left
looking conventional, unsurprising, and therefore as easy as possible to
read and understand.

 2. It leaves the visibility of these members controlled by a single
modifier at the class level as opposed to N+1 modifiers (one for every
member + the class itself). Should the class in question for some reason
need to be promoted to public visibility, for example if it were to be
moved to a different package, its members would automatically inherit
the now-public visibility of the class, which is likely to be the
desired state, because if the class needs to be public, at least some of
its members will need to be public too. The maintainer making that
change can (and should) reduce the visibility of any members that should
remain package-private (e.g. those that exist only for for testing
purposes), but in doing so, they make an explicit and self-documenting
decision that will show up at the level of a Git diff.
2018-02-21 10:45:21 +01:00
Chris Beams
a72bb72473
Rename classes from Node* => SeedNode* as appropriate
Each of the classes here are in fact specific to seed nodes, so have
been renamed accordingly, e.g. from NodeAddresses => SeedNodeAddresses.
2018-02-21 10:45:21 +01:00
Chris Beams
b392864661
Rename CoreSeedNodeRepository => DefaultSeedNodeRepository
The original name was intended to distinguish that this implementation
is the implentation that lives within Bisq's 'core' module. This commit
renames the class to DefaultSeedNodeRepository as this is more idiomatic
and intention-revealing. This implementation is in fact the only one
ever gets used; it is the 'default' (and only) implementation.
2018-02-21 10:33:20 +01:00
Chris Beams
4ac45d7fe8
Rename SeedNodesRepository => SeedNodeRepository
The idiomatic approach to naming domain-driven design (DDD)-style
repositories is to use the singular form of the object being
encapsulated by the repository, e.g. BookRepository vs. BooksRepository.

Thus far, the repository interfaces and implementations created here in
Bisq have used the latter, plural form, but going forward we should
revert to the norm. To this end, this commit renames SeedNodesRepository
and its single implementation to SeedNodeRepository and
CoreSeedNodeRepository respectively.
2018-02-21 10:33:20 +01:00
Chris Beams
a737194d39
Make CoreSeedNodesRepository#seedNodeAddresses final
Also remove the @NotThreadSafe annotation as this class is now stateless
and immutable and therefore naturally threadsafe.

See https://github.com/bisq-network/exchange/pull/1362#discussion_r169143759
for context.
2018-02-21 10:33:20 +01:00
Chris Beams
9c77f4ce57
Simplify CoreSeedNodesRepository#isSeedNode stream pipeline 2018-02-21 10:33:19 +01:00
Chris Beams
b5af59dee0
Remove NetworkStressTest to simplify CoreSeedNodesRepository
NetworkStressTest has been ignored for months because it had become
"outdated" and is therefore now dead code. It is the only place that the
CoreSeedNodesRepository#setTorSeedNodeAddresses
and #setLocalhostSeedNodeAddresses methods were called. Removing it
completely allows for removing these methods and marking the underlying
fields in CoreSeedNodesRepository as final.
2018-02-21 10:33:19 +01:00
tau3
5bb91a3fd3 Fixed factory method for NodeAddresses in case of empty string 2018-02-21 13:17:08 +04:00
Sergey Rozhnov
6f10d7d75e Added headers to new classes 2018-02-15 17:50:50 +04:00
Sergey Rozhnov
bd4439ce2c Made DefaultNodeAddresses impossible to instantiate 2018-02-15 17:48:38 +04:00
Sergey Rozhnov
81b9b8be99 Bound NodeAddressLookup to all necessary modules 2018-02-15 17:41:31 +04:00
Sergey Rozhnov
eea28c3d73 Implemented unit test for NodeAddressLookup 2018-02-15 17:10:53 +04:00
Sergey Rozhnov
60ca9fb14b Implemented unit test for NodeAddresses 2018-02-15 16:59:12 +04:00
Sergey Rozhnov
96528a0fc5 Implemented unit test for ImmutableSetDecorator 2018-02-15 16:41:02 +04:00
Sergey Rozhnov
9889144d90 Extracted AbstractImmutableSetDecorator class 2018-02-15 16:26:44 +04:00
Sergey Rozhnov
180eb6bf9f Refactored some TODOs in NodeAddress and NodeAddressLookup 2018-02-15 15:49:53 +04:00
Sergey Rozhnov
9c2f0d5c00 Refactored CoreSeedNodesRepository using NodeAddressLookup 2018-02-15 15:34:13 +04:00
Sergey Rozhnov
3e13a0f226 Extracted default addresses into a separate class 2018-02-15 15:19:51 +04:00
Sergey Rozhnov
628b14c93c Fixed compilation errors in CoreSeedNodeRepositoryFactory 2018-02-15 14:21:50 +04:00
Sergey Rozhnov
196137b30c Moved NodeAddresses into a separate class 2018-02-15 14:06:20 +04:00
Sergey Rozhnov
05f515741d Moved creation logic into a separate class 2018-02-14 23:32:51 +04:00
Manfred Karrer
ff629542e7
Use camelCase 2018-02-13 20:56:23 -05:00
Manfred Karrer
14035e58a6
Merge pull request #1355 from sqrrm/comp-req-refactor
Comp req refactor
2018-02-13 20:55:29 -05:00
Manfred Karrer
0a1dc70ec0
Fix sorting of altcoins 2018-02-13 20:37:26 -05:00
Manfred Karrer
2dd6a91be8
Merge Obsidian 2018-02-13 20:23:25 -05:00
Manfred Karrer
f8850dfd0a
Merge branch 'list-odn-coin' of https://github.com/Manbearpixel/exchange into Manbearpixel-list-odn-coin
# Conflicts:
#	core/src/main/java/io/bisq/core/trade/statistics/TradeStatisticsManager.java
2018-02-13 20:23:02 -05:00
Manfred Karrer
879d8e0660
Merge branch 'add-darx-altcoin' of https://github.com/bitdaric/exchange into bitdaric-add-darx-altcoin
# Conflicts:
#	core/src/main/java/io/bisq/core/trade/statistics/TradeStatisticsManager.java
#	gui/src/main/java/io/bisq/gui/util/validation/AltCoinAddressValidator.java
#	gui/src/test/java/io/bisq/gui/util/validation/AltCoinAddressValidatorTest.java
2018-02-13 20:19:14 -05:00
Manfred Karrer
c22f52477f
Add Yenten 2018-02-13 20:17:09 -05:00
Manfred Karrer
22a3b94d40
Add Yenten 2018-02-13 20:16:53 -05:00
Manfred Karrer
2f04d1ca89
Merge pull request #1342 from reverendus/list-dai-token
Add DAI Token
2018-02-13 20:11:56 -05:00
Manfred Karrer
0064e5052f
Merge pull request #1332 from tau3/refactor/config-peer-nodes
Refactoring: WalletSetup#configPeerNodes
2018-02-13 13:14:16 -05:00
Manfred Karrer
1bb58261f0
Merge pull request #1331 from sqrrm/bsqparser-genesis-test
Bsqparser genesis test
2018-02-13 12:53:03 -05:00
Manfred Karrer
8c09423d47
Merge pull request #1341 from ghubstan/issue-1184
Add number of open offers to currency filter popups.
2018-02-13 12:46:43 -05:00
Manfred Karrer
949c1c6f2a
Merge pull request #1352 from ripcurlx/change-offerbook-column-headers
Change offerbook column headers
2018-02-13 12:42:05 -05:00
Manfred Karrer
cef91991c6
Merge pull request #1350 from ripcurlx/unify-column-oder
Unify order of columns in offer book
2018-02-13 12:41:03 -05:00
Manfred Karrer
e5e7ded68f
Merge pull request #1334 from ripcurlx/change-goto-screen-after-trade
Change path after completed trade
2018-02-13 12:38:45 -05:00
Manfred Karrer
d653e8263d
Change text for portfolio.pending.tradePeriodWarning 2018-02-13 12:37:06 -05:00
Manfred Karrer
311b67573f
Merge pull request #1328 from ripcurlx/improve-info-during-trade-process
Improve info during trade process
2018-02-13 12:33:05 -05:00
Manfred Karrer
f29f0e03d7
Change Bitcoin Classic to Bitcoin Clashic 2018-02-13 12:28:17 -05:00
Manfred Karrer
2cfc1b214f
Merge remote-tracking branch 'origin/master' 2018-02-13 12:27:30 -05:00
Manfred Karrer
2287ec1eab
Merge pull request #1321 from stevenkain/patch-5
Update displayStrings.properties
2018-02-13 12:27:22 -05:00
Manfred Karrer
6ca1f2500a
Merge pull request #1316 from ripcurlx/finalize-info-icon-for-funds-needed
Finalize info icon for funds needed
2018-02-13 12:06:44 -05:00
Manfred Karrer
1b8fce9374
Merge branch 'finalize-info-icon-for-funds-needed' of https://github.com/ripcurlx/exchange 2018-02-13 12:03:31 -05:00
Manfred Karrer
224a91bbd6
Merge pull request #1313 from blabno/feature/1204-use-environment-locale-to-select-right-locale-and-currency
Use environment locale to select right locale and currency
2018-02-13 12:02:34 -05:00
sqrrm
ab47148079
Move compensation request domain specifics out of gui 2018-02-13 15:26:03 +01:00
sqrrm
f73395f6f1
Fix log spelling 2018-02-13 14:03:08 +01:00
sqrrm
3fdb4fb860
Only warn on duplicate foreign compensation requests 2018-02-13 14:02:40 +01:00
sqrrm
d06746e78b
Change warning log to info 2018-02-13 13:48:48 +01:00