Commit graph

10155 commits

Author SHA1 Message Date
Steven Barclay
a26366ee0d
Un-generify Popup class
Remove the type parameter from Popup<T>, as it appears to have never
been used or set anywhere in the code. (This mainly involves replacing a
lot of "new Popup<>" occurrences.)
2019-11-20 21:27:11 +00:00
Dimitris Apostolou
587b55d37b
Fix typos and cleanup 2019-11-20 22:56:19 +02:00
Florian Reimair
ab214d3fe7
Merge pull request #3637 from rex4539/fix-typos
Fix typos and cleanup in documentation
2019-11-20 10:44:44 +01:00
Christoph Atteneder
928b35c7d3
Merge pull request #3635 from cbeams/upgrade-shadow-plugin
Upgrade Gradle Shadow plugin from 4.0.2 => 5.2.0
2019-11-20 10:43:45 +01:00
Florian Reimair
f6740d06a0
Merge pull request #3585 from blabno/sort-gradle-witness
Sort existing gradle-witness.gradle
2019-11-20 10:37:50 +01:00
Florian Reimair
8025cc10a1
Merge pull request #3634 from bodymindarts/coin-formatter-interface
Coin formatter interface
2019-11-20 10:28:35 +01:00
Christoph Atteneder
778e9b2b79
Implement installation path check on Windows (#3642)
* Implement installation path check on Windows

Prior to starting the installation, check if the install location
contains special characters and if so use a different default install
location as well as display a prompt to the user providing additional
details.

This is in response to #3605, for which a proper solution has yet to be
found.

* Ensure the destination location dialog is always shown

This resolves #552

* Show the Welcome dialog

Rather then potentially being greeted with the newly implemented
prompt on the destination location dialog if they have special
characters in their install path, greet the user with the Welcome
dialog when they initially launch the installer.

* Reorder/group setup items logically
2019-11-20 10:22:23 +01:00
Devin Bileck
446c80291c
Reorder/group setup items logically 2019-11-20 00:58:55 -08:00
Devin Bileck
33c611c8cc
Show the Welcome dialog
Rather then potentially being greeted with the newly implemented
prompt on the destination location dialog if they have special
characters in their install path, greet the user with the Welcome
dialog when they initially launch the installer.
2019-11-20 00:56:54 -08:00
Devin Bileck
eba7fddc0f
Ensure the destination location dialog is always shown
This resolves #552
2019-11-20 00:45:45 -08:00
Devin Bileck
0ea11ebc46
Implement installation path check on Windows
Prior to starting the installation, check if the install location
contains special characters and if so use a different default install
location as well as display a prompt to the user providing additional
details.

This is in response to #3605, for which a proper solution has yet to be
found.
2019-11-20 00:39:52 -08:00
Dimitris Apostolou
ce8804b418
Fix typos and cleanup 2019-11-20 01:24:48 +02:00
Julian Knutsen
849155a92a
[TESTS] Regression test for #3629
Write a test that shows the incorrect behavior for #3629, the hashmap
is rebuilt from disk using the 20-byte key instead of the 32-byte key.
2019-11-19 12:39:43 -08:00
lusarz
2f6589b5e5
Refactor SendAlertMessageWindow - remove redundant interfaces 2019-11-19 18:50:21 +01:00
lusarz
ba0437e6b0
Refactor FilterWindow - remove redundant interfaces 2019-11-19 18:50:17 +01:00
Chris Beams
1a2461fcdf
Upgrade Gradle Shadow plugin from 4.0.2 => 5.2.0
After the upgrade from Gradle 4.10.2 to 5.6.4 in commit 5fe71fa0a,
all of Bisq's shadowJar tasks started failing Gradle's incremental build
checks. This meant that repeated invocations of `gradle build` went from
a handful of seconds to more than a minute, because shadowJar tasks had
to be re-executed on every build.

For example, with --info enabled, one would see entries like this in the
build output:

    > Task :seednode:shadowJar
    Custom actions are attached to task ':seednode:shadowJar'.
    Caching disabled for task ':seednode:shadowJar' because:
      Caching has not been enabled for the task
    Task ':seednode:shadowJar' is not up-to-date because:
      Output property 'archiveFile' file [...]libs/seednode.jar has changed.

This problem was solved by in johnrengelman/shadow#524 and made
available in the project's recent 5.0.2 release. This patch simply bumps
the shadow plugin version to that value, and gets us back to snappy
incremental builds, e.g.:

    $ gradle build

    BUILD SUCCESSFUL in 7s
2019-11-19 18:05:14 +01:00
Julian Knutsen
a8139f3a04
Remove HashmapChangedListener::onBatch operations
Now that the only user of this interface has been removed, go ahead
and delete it. This is a partial revert of
f5d75c4f60 that includes the code that was
added into ProposalService that subscribed to the P2PDataStore.
2019-11-19 08:37:40 -08:00
Julian Knutsen
a50e59f7eb
ProposalService::onProtectedDataRemoved signals listeners once on batch removes
#3143 identified an issue that tempProposals listeners were being
signaled once for each item that was removed during the P2PDataStore
operation that expired old TempProposal objects. Some of the listeners
are very expensive (ProposalListPresentation::updateLists()) which results
in large UI performance issues.

Now that the infrastructure is in place to receive updates from the
P2PDataStore in a batch, the ProposalService can apply all of the removes
received from the P2PDataStore at once. This results in only 1 onChanged()
callback for each listener.

The end result is that updateLists() is only called once and the performance
problems are reduced.

This removes the need for #3148 and those interfaces will be removed in
the next patch.
2019-11-19 08:37:39 -08:00
Julian Knutsen
eae641ee73
Update removeExpiredEntries to remove all items in a batch
This will cause HashMapChangedListeners to receive just one onRemoved()
call for the expire work instead of multiple onRemoved() calls for each
item.

This required a bit of updating for the remove validation in tests so
that it correctly compares onRemoved with multiple items.
2019-11-19 08:37:39 -08:00
Julian Knutsen
489b25aa13
Change removeFromMapAndDataStore to signal listeners at the end in a batch
All current users still call this one-at-a-time. But, it gives the ability
for the expire code path to remove in a batch.
2019-11-19 08:37:38 -08:00
Julian Knutsen
4f08588717
[REFACTOR] removeFromMapAndDataStore can operate on Collections
Minor performance overhead for constructing MapEntry and Collections
of one element, but keeps the code cleaner and all removes can still
use the same logic to remove from map, delete from data store, signal
listeners, etc.

The MapEntry type is used instead of Pair since it will require less
operations when this is eventually used in the removeExpiredEntries path.
2019-11-19 08:37:38 -08:00
Julian Knutsen
b281566e14
[REFACTOR] HashMapListener::onAdded/onRemoved
Previously, this interface was called each time an item was changed. This
required listeners to understand performance implications of multiple
adds or removes in a short time span.

Instead, give each listener the ability to process a list of added or
removed entrys which can help them avoid performance issues.

This patch is just a refactor. Each listener is called once for each
ProtectedStorageEntry. Future patches will change this.
2019-11-19 08:37:38 -08:00
Julian Knutsen
3bd67bab05
[TESTS] Clean up 'Analyze Code' warnings
Remove unused imports and clean up some access modifiers now that
the final test structure is complete
2019-11-19 08:30:24 -08:00
Julian Knutsen
617585d859
[PR COMMENTS] Make maxSequenceNumberBeforePurge final
Instead of using a subclass that overwrites a value, utilize Guice
to inject the real value of 10000 in the app and let the tests overwrite
it with their own.
2019-11-19 08:30:24 -08:00
Bernard Labno
37918f5df7
Sort existing gradle-witness.gradle
This should make comparison in future much easier.
2019-11-19 17:28:59 +01:00
Justin Carter
80fda1ec2c
Inject CoinFormatter via BTC_FORMATTER_KEY 2019-11-19 15:54:18 +01:00
Niyi Dada
8cfe221bbf
Fix formatting 2019-11-19 15:19:14 +01:00
Niyi Dada
07119470ff
Broke merit text setting to 2 lines. 2019-11-19 15:15:00 +01:00
Justin Carter
68a988b3a8
Remove dead code 2019-11-19 14:24:30 +01:00
Justin Carter
cb8873fa6d
Move BsqFormatter and ImmutableCoinFormatter under .coin package 2019-11-19 14:23:18 +01:00
Justin Carter
d23ae558e7
Rename BSFormatter to ImmutableCoinFormatter 2019-11-19 14:11:01 +01:00
Justin Carter
ed97f7a9e5
Use interface instead of class name for CoinFormatter 2019-11-19 14:00:22 +01:00
Justin Carter
d10683e192
Extract CoinFormatter interface 2019-11-19 12:30:31 +01:00
Justin Carter
2f7a924792
Remove dead code from BSFormatter 2019-11-19 12:18:10 +01:00
Florian Reimair
b0c68e0b5a
Adjust monitor timeout
Observed, that a timeout of one minute works better than
the original 90 seconds.
2019-11-19 12:12:09 +01:00
Florian Reimair
debb94f0a6
Add RefundAgent messages to monitor
Add the relatively new RefundAgent message to the monitor.
2019-11-19 12:10:55 +01:00
Florian Reimair
97586ff8dd
Fixed monitor market API query
The format of the market API response changed. Formerly,
there has been one line, now it is pretty print json.
2019-11-19 12:01:09 +01:00
Florian Reimair
edefcdb368
Monitor selects a price node randomly
Up until now, the monitor always chose the price nodes
in their configured order. This resulted in querying
always the same node and thus, create a bigger system
load for this very node. Only in case of a failure,
the monitor moved on to another node.

Shuffling the list of nodes prior to querying provides
at least some load balancing for the price nodes.
2019-11-19 11:48:58 +01:00
Florian Reimair
74b84159ca
Price monitor is more resilient against timeouts
Recenty, a price node got removed. Unfortunately, this node
has been the first in the list of configured price nodes in
the monitor configuration.

A misplaced catch block caused the loop to stop instead of
trying the next configured price node in the list.
2019-11-19 11:45:01 +01:00
Florian Reimair
cf575966dc
Updated price node list for monitor 2019-11-19 11:44:21 +01:00
Christoph Atteneder
95257b10f9
Refactor of FilterWindow - eliminate duplicates (#3616)
* Extract setupFieldFromList method in FilterWindow

* Extract readAsPaymentAccountFiltersList method in FilterWindow

* Extract setupFieldFromPaymentAccountFiltersList method in FilterWindow

* Reformat sendButton handler in FilterWindow
2019-11-19 10:39:59 +01:00
Christoph Atteneder
8c8c7117d3
Refactorings for api support (#3611)
* Remove trailing spaces

* Add toProtoTradeStatistics2 method

API will use getTradeStatistics and expect TradeStatistics2 not
PersistableNetworkPayload

* Add CreateOfferService class

* Remove commented out code

* User weaker access, add final

* Add getRandomOfferId method

* Add getSellerSecurityDeposit method

* Add getEstimatedFeeAndTxSize method

- Rename estimateTxSize to updateEstimatedFeeAndTxSize
- Add getEstimatedFeeAndTxSize method to CreateOfferService
- Add dependent methods and fields

* Use methods from createOfferService

- Use getBuyerSecurityDepositAsCoin and getSellerSecurityDepositAsCoin
from CreateOfferService

* Use txFeeFromFeeService from createOfferService

- Use getEstimatedFeeAndTxSize from CreateOfferService for
txFeeFromFeeService

* Use getPriceAsLong from createOfferService

* Use marketPriceMarginParam from createOfferService

* Pass useMarketBasedPriceValue to getPriceAsLong

* Use getMaxTradeLimit from createOfferService

* Use createAndGetOffer from createOfferService

* Remove unused fields

* Add createOfferService, remove unused params

* Use weaker access

* Add null checks

* Add log of params, Cleanup

* Remove unused fields

* Use weaker access

* Remove trivial methods

* Remove trivial methods, rename methods

* Sort params for offer as they are used

* Use getReservedFundsForOffer from createOfferService

* Add MakerFeeProvider

* Adjust to new super class params

* Remove sellerSecurityDeposit field, refactor placeOffer

* Adjust tests to new params
2019-11-19 09:49:38 +01:00
Christoph Atteneder
30b1f0229b
Reduce bs formatter interface (#3253)
* Extract FormattingUtils from BSFormatter

All formatting related functions that are depended on by core and
desktop jars are extracted to the new class FormattingUtils.

* Remove dead Code from BSFormatter

* Move Currency related helpers out of BSFormatter to CurrencyUtils

* Move functions that only have 1 call-site out of BSFormatter

Make them private instance functions at call site to minimize
dependencies.
2019-11-19 09:44:41 +01:00
Justin Carter
cfaa23effc
Move functions that only have 1 call-site out of BSFormatter
Make them private instance functions at call site to minimize
dependencies.
2019-11-19 09:24:06 +01:00
Justin Carter
dc741984ce
Move Currency related helpers out of BSFormatter to CurrencyUtils 2019-11-19 09:24:05 +01:00
Justin Carter
06c2fa5ea0
Remove dead Code from BSFormatter 2019-11-19 09:24:05 +01:00
Justin Carter
df6812a4c9
Extract FormattingUtils from BSFormatter
All formatting related functions that are depended on by core and
desktop jars are extracted to the new class FormattingUtils.
2019-11-19 09:23:57 +01:00
Christoph Atteneder
e157ac3121
Merge pull request #3630 from devinbileck/bump-javafx-version
Bump javafx version to 11.0.2
2019-11-19 09:07:12 +01:00
Christoph Atteneder
ad0cfd288e
Merge pull request #3631 from devinbileck/fix-package.bat
Fix package.bat version parsing
2019-11-19 08:58:05 +01:00
Devin Bileck
3f91f60cd3
Fix package.bat version parsing
The package.bat script parses the first 3 tokens of the version string
to determine the file version. This is done to strip "-SNAPSHOT" from
the version string since the file version can only contain a numeric
version number.
2019-11-18 23:36:40 -08:00