Commit graph

14297 commits

Author SHA1 Message Date
Christoph Atteneder
68e4a72c03
Add sanity check 2021-02-01 11:26:45 +01:00
Christoph Atteneder
9c31abfd36
Reset references to enable GC 2021-02-01 11:26:33 +01:00
Christoph Atteneder
91e75641eb
Minor cleanup 2021-02-01 11:26:24 +01:00
Christoph Atteneder
dcfcf6c214
Add sanity check 2021-02-01 11:24:20 +01:00
sqrrm
a819e9e9ca
Merge pull request #5133 from ripcurlx/fix-ui-overlap-for-offer-matching-feature
[v1.5.5] Prevent overlapping in offer book tools bar
2021-02-01 11:16:35 +01:00
Christoph Atteneder
ade1c86c72
Reset references to enable GC 2021-02-01 10:52:21 +01:00
Christoph Atteneder
fd3f0e6d25
Minor cleanup 2021-02-01 10:52:06 +01:00
Christoph Atteneder
18d622e680
Bottom align elements in offerbook tools box 2021-02-01 09:33:21 +01:00
Christoph Atteneder
a35f50c882
Cleanup code 2021-02-01 09:33:12 +01:00
Christoph Atteneder
429ae08414
Prevent overlapping of offer tools
Moves everything into box to prevent hiding of information in all languages
2021-02-01 09:32:53 +01:00
Christoph Atteneder
1af7e6a971
Bottom align elements in offerbook tools box 2021-02-01 09:30:37 +01:00
Christoph Atteneder
7c81e1e47b
Merge pull request #5141 from chimp1984/fix-incorrect-order-of-onUpdatedDataReceived-method-calls
onUpdatedDataReceived must be called in the correct order.
2021-02-01 09:11:46 +01:00
chimp1984
0bfa633e23
Extract onSendBsq method, return early 2021-01-31 15:15:16 -05:00
chimp1984
9041bf4938
onUpdatedDataReceived must be called in the correct order.
We cannot use a listener at RequestDataManager as the order
is not defined if doing so.
So we use P2PService as our controlling entity to call
further clients in the correct order.
2021-01-31 19:38:46 +01:00
chimp1984
4db71e5d64
onUpdatedDataReceived must be called in the correct order.
We cannot use a listener at RequestDataManager as the order
is not defined if doing so.
So we use P2PService as our controlling entity to call
further clients in the correct order.
2021-01-31 13:35:28 -05:00
chimp1984
a8fc33c30d
On mainNet we expect to have received a filter object, if not show a
popup to the user to inform the Bisq devs.
Set filterWarningHandler before calling onAllServicesInitialized
2021-01-30 13:08:00 -05:00
chimp1984
2de65bb686
Remove unused BalanceWithConfirmationTextField 2021-01-30 11:59:21 -05:00
Christoph Atteneder
4164c77cf9
Cleanup code 2021-01-30 16:56:38 +01:00
Christoph Atteneder
2839b7a73a
Prevent overlapping of offer tools
Moves everything into box to prevent hiding of information in all languages
2021-01-30 16:56:02 +01:00
ghubstan
99af81d51d
Remove DONE flag
There should not be a check on that flag in the rolling offers script.
Terminate the script with ^C.
2021-01-29 18:13:34 -03:00
ghubstan
e3f707fea6
Make executetrade simulation more realistic
Demonstrate how traders poll trade status as they go through
the protocol.
2021-01-29 18:04:02 -03:00
Steven Barclay
9f9818d673
Fix broken WalletService.getTransactionConfidence(tx, address)
Undo the earlier simplification changes to getTransactionConfidence,
which preserved its original but broken behaviour. Fix the original
stream pipeline so that each matching tx input maps to the confidence of
the connected parent tx (if any), not the child tx. In this way, it
correctly considers parent tx confidences when determining the most
recent confidence of all the matching inputs & outputs.

Before it was simply feeding a repeating list of identical objects into
getMostRecentConfidence, via the erroneous line:

  .map(o -> tx.getConfidence())

(Also add a missing @Nullable annotation & make getMostRecentConfidence
private instead of protected.)

Finally, simplify BisqWalletListener.onTransactionConfidenceChanged, by
no longer feeding a singleton list into getMostRecentConfidence whose
element is already a return value of that method, as that is a no-op.
2021-01-29 20:33:59 +00:00
Christoph Atteneder
3781b5f8b3
Merge pull request #5122 from stejbac/fix-stale-trade-statistics-list-view
Fix stale trade statistics list view when new entries arrive
2021-01-29 19:34:58 +01:00
ghubstan
da5e1e5ade
Add functions for checking trade status 2021-01-29 13:53:23 -03:00
ghubstan
d580e77bf8
Try alternative syntax to make codacy happy
The codacy issue "$/${} is unnecessary on arithmetic variables"
seems to not apply to $(echo $((1 + $RANDOM % 10))), but we
try another syntax to make her happy.
2021-01-29 11:47:37 -03:00
jmacxx
3757ec36f7
Wording change for CashByMail suggested by @m52go 2021-01-29 11:48:27 +01:00
Christoph Atteneder
e5175068cb
Merge pull request #5118 from jmacxx/word_change_m52go
Wording change for CashByMail
2021-01-29 11:47:43 +01:00
ghubstan
27a4a31dcc
Add apitest rolling offer simulation script
The script demonstrats a way to always keep one offer in the market.
As soon as the offer is taken and the trade is completed, another
offer is placed.
2021-01-28 20:11:09 -03:00
ghubstan
74008e9385
Move createoffer command generation to its own function 2021-01-28 19:56:15 -03:00
ghubstan
5a78d18103
Refactor createpaymentacct and trade protocol functions
Code duplication needs to be reduced as new scripts are added.

- Refactor the createpaymentacct functions.
  The steps required to create a payment account are still
  displayed, but only for Alice, not Bob.

- Treat the trade protocol simulation as an atomic function.
  This will reduce 'main' simulation script size as new
  ones are added.
2021-01-28 19:33:21 -03:00
ghubstan
017db11217
Check wallet is avaiable and/or unlocked on createoffer
Do not attempt to create an offer if the server wallet is
unavailable.  And if the wallet is encrypted, do not attempt
to create an offer if the wallet is not unlocked.
2021-01-28 14:50:22 -03:00
ghubstan
1eaa081e77
Git-ignore apitest dao-setup files
Added .gitignore line for apitest dao-setup files.  Regtest/DAO
setup files downloaded during a build should not be tracked by git,
nor saved in the repo.  These are the files downloaded, unzipped
and installed by the gradle task installDaoSetup:
    $ ./gradlew clean build :apitest:installDaoSetup
2021-01-28 14:21:30 -03:00
jmacxx
a11d8a42c3
Add 4 missing SEPA countries AD, SM, VA, JE. 2021-01-27 23:20:30 -06:00
Steven Barclay
0a38aebdf8
Fix stale trade stats list view when new entries arrive
Ensure the trade statistics list in TradesChartsView doesn't go stale
upon new stats arrivals, by moving a fillList() call from the currency
combobox onChangeConfirmed event handler to the selectedTradeStatistics
(TradesChartsViewModel field) listener.

Also avoid unnecessary use of an ObservableList as a temporary variable.
2021-01-27 20:42:52 +00:00
Steven Barclay
d0172c2424
Load (Deposit|Transactions)ListItem tooltips lazily
Add a nested class of lazy fields to (Deposit|Transactions)ListItem,
together with an associated memoised Supplier, lazyFieldsSupplier, which
initialises them all the first time any one of them is requested. Move
the txConfidenceIndicator & tooltip fields to this class, so that they
are only loaded when the given address/tx row is displayed in the
deposit/transactions views, respectively.

This prevents a minor bottleneck, as profiling indicates that creating a
tooltip for each tx confidence indicator in the list is quite expensive
and takes up around half the rendering time. (There may be 1000's of txs
or addresses in an old wallet.)
2021-01-26 23:58:13 +00:00
Steven Barclay
8a385ba91b
Add missing WalletService.removeBalanceListener to fix leak
Fix a serious memory leak in DepositListItem due to missing removal of
the BalanceListener (one per item) from BtcWalletService. This prevented
GC of the entire list of items, which was observed to leak ~500 MB in
JProfiler after repeated switching (several dozen times) between tabs.
2021-01-26 23:20:55 +00:00
Steven Barclay
db26a1fe2d
Optimise TransactionAwareTrade.isRelatedToTransaction
Attempt to remove a bottleneck during the transactions view load, as
revealed by JProfiler, by optimising the code to determine if any given
transaction and trade are related. Since both these sets will tend to
grow linearly with time, causing quadratic slowdown of TransactionsView,
try to alleviate (without completely fixing) the problem.

To do this, add a cached set of disputed trade IDs to DisputeListService
so that TransactionAwareTradable.is(Dispute|RefundPayout)Tx can be made
O(1) in the common case that the given trade is not involved in any
dispute. Also avoid calling Sha256Hash::toString by passing tx IDs as
Sha256Hash objects directly to is(Deposit|Payout)Tx, and short circuit
an expensive call BtcWalletService.getTransaction in isDelayedPayoutTx,
in the common case, by pre-checking the transaction locktime.

This also fixes a bug in isRefundPayoutTx whereby it incorrectly returns
false if there are >1 disputes in the list returned by RefundManager but
the given trade is not involved in the last one.
2021-01-26 20:10:47 +00:00
Steven Barclay
97779f10d8
Use cache for WalletService.getConfidenceForAddress
Use a guava SetMultimap (a many-to-many mapping without duplicates) to
cache the set of live txs in the user's wallet with a given address as
an input or output. As with the cache of output counts from the previous
commit, compute all the tx sets in one go (by a tx stream followed by a
map inverse) and store in an ImmutableSetMultimap<Address, Transaction>,
invalidating the entire cache immediately upon each wallet change event.

This is to fix another (larger) quadratic time bug in DepositView, when
getting the confidence (i.e. confirmation count) of each wallet address.

Also simplify getTransactionConfidence & onTransactionConfidenceChanged
methods slightly, which generated (possibly unintentionally) repeating &
singleton lists of TransactionConfidence objects to pass to
WalletService.getMostRecentConfidence(..) respectively.
2021-01-26 17:43:03 +00:00
Steven Barclay
217aaf826d
Use cache for WalletService.getNumTxOutputsForAddress
Use a guava Multiset to cache the total number of tx outputs (out of the
live txs in the user's wallet) with a given address. Since this requires
a scan of the entire tx set, compute all the counts in one go and store
in an ImmutableMultiset<Address>. Invalidate the entire cache any time a
tx set change occurs, by attaching a WalletChangeEventListener to the
wallet (using a direct executor for immediate effect).

This is to fix a quadratic time bug in DepositView, which uses the count
to determine if a given address in the BTC wallet is used/unused.
2021-01-26 15:35:19 +00:00
Steven Barclay
70a13b8783
Refactor: add & remove wallet listeners from the same class
Make the WalletService.walletEventListener field private and add it via
a protected method defined in the base class, addListenersToWallet(), so
that the setup code in the two subclasses (Bsq|Btc)WalletService can be
deduplicated and more easily kept in sync with the listener removal code
in WalletService.shutDown().

Also remove some unnecessary deprecation warning suppressions.
2021-01-26 12:54:26 +00:00
jmacxx
7ea3f1c9d9
Wording change for CashByMail suggested by @m52go 2021-01-25 22:24:57 -06:00
ghubstan
c99624015b
Factor out repeated 'new CallRateMeteringInterceptor' calls
Move this into a static CallRateMeteringInterceptor.valueOf(Map) method.
2021-01-25 14:38:53 -03:00
sqrrm
e8712bdd70
Merge pull request #5115 from ripcurlx/update-data-stores-for-v1.5.5
Update data stores for v1.5.5
2021-01-25 18:36:22 +01:00
ghubstan
30a0f99861
Fix bash syntax inconsistencies
Many unnecesary braces around ${VARIABLE} references were removed.
2021-01-25 12:30:59 -03:00
Christoph Atteneder
60fc17be2c
Update data stores for v1.5.5 2021-01-25 14:18:21 +01:00
Christoph Atteneder
cae95ce2f9
Update bitcoinj checkpoints for v1.5.5 2021-01-25 09:37:59 +01:00
jmacxx
d579361df7
CBM currency selection to use drop down combo
This changes CBM to use one currency per payment account.
2021-01-25 09:37:10 +01:00
Christoph Atteneder
694f96806e
Merge pull request #5114 from jmacxx/cbm_currencies
Cash By Mail currency selection to use drop down combo
2021-01-24 20:05:55 +01:00
jmacxx
dbdaadba89
CBM currency selection to use drop down combo
This changes CBM to use one currency per payment account.
2021-01-24 11:21:41 -06:00
Jakub Loucký
172af9bd6b
Resolve unintended ellipsis. Make popup wider. 2021-01-24 15:06:54 +01:00