Commit graph

6351 commits

Author SHA1 Message Date
chimp1984
c88addef16
Break up if else clauses (helps for improvements
in later commits)
2021-11-14 15:07:33 +01:00
chimp1984
b427795e4c
Extract minFeeParam
Cleanup
2021-11-14 15:07:33 +01:00
chimp1984
e57c682001
Add blockHeightAtOfferCreation to TxValidator
Used in case of maker fee validation
2021-11-14 15:07:33 +01:00
chimp1984
65285e2c69
Add filterManager to filterManager (will
be used in follow-up commits)
2021-11-14 15:07:33 +01:00
chimp1984
a082fd4a84
Add fee fields to filter 2021-11-14 15:07:32 +01:00
chimp1984
478b7568ee
Add return
Add more info in case it fails
2021-11-14 11:28:25 +01:00
chimp1984
f054c8ae95
Rename 2021-11-14 02:00:54 +01:00
chimp1984
65d3ef4ff5
Add check for isUseMarketBasedPrice 2021-11-14 02:00:00 +01:00
Chris Beams
e09d56b696
Upgrade Mockito to 4.0.0
This fixes the 'Unsupported class file major version 60' problem
documented at mockito/mockito#2065 to allow building Bisq on JDK 16+.
2021-11-13 13:53:38 +01:00
ghubstan
9f01279141
Merge branch 'master' into 1-basic-api-bsqswap-support 2021-11-12 18:56:54 -03:00
ghubstan
564303ac20
Normalize API gRPC bsq-swap related protos & wrappers
This commit refactors the first cut of the BsqSwapTradeInfo and
TradeInfo gRPC proto defs and wrappers.  The change avoids duplication
of fields between BsqSwapTradeInfo and TradeInfo, and adds a
bsqSwapTradeInfo field to the old TradeInfo proto & wrapper.

The immediate goal is moving towards getting the API's 'gettrade'
method to work for both Bisq v1 trades and BSQ swap trades:  the TradeInfo
proto sent to the CLI should represent either a Bisq v1 trade or a BSQ
swap trade.  A mid-term term goal is to also make a new 'gettrades' method
return a List<TradeInfo> to the CLI, where items in the List<TradeInfo>
can be either v1 trades or bsq-swap trades.
2021-11-12 18:48:35 -03:00
Christoph Atteneder
17d4d425a7
Merge pull request #5823 from jmacxx/add_ach_domestic_wire
Add payment methods ACH Transfer and Domestic Wire Transfer
2021-11-12 20:51:46 +01:00
jmacxx
bf311e36fb
Add payment methods ACH Transfer and Domestic Wire Transfer 2021-11-12 11:50:43 -06:00
Christoph Atteneder
3e6bb3bc7f
Merge pull request #5819 from chimp1984/fix-reorg-handling
Fix reorg handling
2021-11-12 10:50:06 +01:00
ghubstan
3dfbf3f6f0
Partially adjust core api for bsq-swap support
- Add core api methods to help CLI determine which type of offer to
  take for a given offerId.  CLI's 'takeoffer` will need to determine
  which gRPC/proto request type to send to server.

- Add implemetations for getBsqSwapTradeRole(), for tradeId or trade.
2021-11-11 13:12:41 -03:00
ghubstan
521495c41d
Add conveniences isFiatOffer(offer), isAltcoinOffer(offer) 2021-11-11 13:07:49 -03:00
ghubstan
713b309f4a
Add String getRole(BsqSwapTrade trade) method 2021-11-11 13:06:23 -03:00
ghubstan
5d63fd7e39
Partially adjust api proto wrappers for bsq-swap support
- Complete BsqSwapTradeInfo impl.
- Merge BsqSwapOfferInfo fields into OfferInfo and remove BsqSwapOfferInfo.
- Change all model builders to private static class Builder.
2021-11-11 13:01:48 -03:00
Christoph Atteneder
9538b538ea
Merge pull request #5821 from jmacxx/add_tikkie_twusd
Add payment methods Tikkie and TransferWise-USD
2021-11-11 11:03:38 +01:00
jmacxx
f72b6c0b0a
Add payment methods Tikkie and TransferWise-USD 2021-11-10 21:48:10 -06:00
jmacxx
5bf7bba0c6
Changes required for GRIN re-listing 2021-11-10 14:23:04 -06:00
chimp1984
0edccd9fe1
Only call parseBlocksOnHeadHeight if our latest block from
persistance is below the chain height of btc core.
With the new handling of dao state hashblocks it can be the
we have persisted the latest block up to the chain height.
Before that change we only had the last snapshot which was at least
20 blocks back persisted.
We want to avoid to get caught in a retry loop at parseBlocksOnHeadHeight
so we filter out that case just at the caller.

At parseBlocksOnHeadHeight we inline the requestChainHeadHeightAndParseBlocks
method as it is not used by other callers anymore.
This case  that we request a block but our local btc core chain hight is below
that might be some edge case when we had a synced dao blocks but we btc core is
resyncing...
2021-11-10 17:41:58 +01:00
chimp1984
42500c0370
Do not call resultHandler in case of a RequiredReorgFromSnapshotException
We trigger a resync from resources if there is a reorg and don't want to
continue to request blocks
2021-11-10 17:36:49 +01:00
chimp1984
450800d101
Remove startReOrgFromLastSnapshot methods in LiteNode
and FullNode

The custom implementations triggered to repeat requests
but we shut down the seed node in case of a reorg and
for desktops we request the user to shutdown.
2021-11-10 13:13:06 +01:00
chimp1984
faa8bd2ab2
Extract code in CommonSetup which uses a timer
to startPeriodicTasks.
Call that from BisqExecutable.onApplicationLaunched

We have created a non-UI timer before for the
printSystemLoadPeriodically as that was called
before the configUserThread was called (where we
define the UI timer for desktop)
2021-11-10 12:26:54 +01:00
chimp1984
d9c509ba53
Fix missing handling for non-mainnet use case 2021-11-09 22:42:37 +01:00
Christoph Atteneder
bb1a1b5170
Merge pull request #5808 from jmacxx/seller_confirm_button
Confirm button state for BTC seller to be disabled in mediation
2021-11-09 21:27:37 +01:00
Christoph Atteneder
1578f45ffc
Merge pull request #5812 from ghubstan/02-cli-console-formatting-api
Deprecate and replace hard-coded CLI console output formatters
2021-11-09 21:21:52 +01:00
chimp1984
8d22904ee3
Fix missing param in test 2021-11-09 20:48:17 +01:00
chimp1984
beb4590ef7
Use static fields for addresses 2021-11-09 20:42:30 +01:00
chimp1984
e2bf77fb59
Fixes https://github.com/bisq-network/bisq/issues/5762
Avoid that outdated donation and fee addresses are used.

In case we get an outdated donation address (RECIPIENT_BTC_ADDRESS)
we trigger a dao resync. The user get a popup for doing a restart
in that case.
For the fee address selection we do not fall back to the
RECIPIENT_BTC_ADDRESS in case no address from filter is provided
but we use the hard coded address of the current fee receiver address.
2021-11-09 20:42:30 +01:00
chimp1984
cf9e49134a
Add shutDown method to ClockWatcher and shut it down at shutdown 2021-11-09 20:00:34 +01:00
chimp1984
87f4444210
Add git lfs support for BsqBlocks in resources
Fix typo
2021-11-09 17:22:35 +01:00
ghubstan
20cc085dc8
Merge branch 'master' into 02-cli-console-formatting-api 2021-11-09 09:20:06 -03:00
chimp1984
1108e98164
Add isEmpty check 2021-11-09 13:01:21 +01:00
chimp1984
c600259267
Fix typo 2021-11-09 13:01:21 +01:00
chimp1984
97e356c79f
Add check that height of last block matches chainHeight from daoState 2021-11-09 13:01:21 +01:00
chimp1984
62b3e51b22
Cleanups, change log levels 2021-11-09 13:01:19 +01:00
chimp1984
3487932f6e
Remove unnecessary sorting
Blocks are always sorted by block height
2021-11-09 13:01:19 +01:00
chimp1984
a3fbdf48d2
Improve log 2021-11-09 13:01:19 +01:00
chimp1984
7c32587453
Persist bsq blocks as buckets of 1000 blocks
Improve logging

Add BsqBlockStore to protobuf

Remove DaoStateMonitoringService field

Do not persist the blocks in daoState anymore.

This improves persistence performance and reduces memory
requirements for snapshots.
2021-11-09 13:01:19 +01:00
chimp1984
699048634b
Avoid unnecessary serialisation/deserialisation cycle
For the snapshot we create a deep clone by protobuf serialisation.
We do not need the deserialisation back to the java object as it is
only kept in memory for later persistence where we need to do protobuf
serialisation again. So we can skip that cycle and safe a bit of
time at creating and persisting snapshots.
2021-11-09 13:01:19 +01:00
chimp1984
b619afa83d
Remove unused field 2021-11-09 13:01:18 +01:00
chimp1984
4d2d0717b5
Add getBlockTimeAtBlockHeight method
Improve getBlockStartDateByCycleIndex method
2021-11-09 13:01:18 +01:00
chimp1984
779bd0cf1e
Remove blockHashes set from daoState
Was only used from one use case which can be done differently.
2021-11-09 13:01:18 +01:00
Christoph Atteneder
65c308f5ed
Merge pull request #5782 from chimp1984/redesign-dao-state-monitoring
Redesign dao state monitoring [4]
2021-11-09 12:12:22 +01:00
chimp1984
7e1696b095
Fix typos, cleanups 2021-11-08 21:49:08 +01:00
Christoph Atteneder
00d7913bc6
Merge pull request #5055 from Jakub-CZ/button-buy-bsq
Add "Buy BSQ" button next to trade fee selector
2021-11-08 11:13:52 +01:00
jmacxx
cea4fb30a2
Fix calculation & display of Locked Funds 2021-11-07 21:24:59 -06:00
ghubstan
edd01418ca
Remove fields/methods/logic for creating redundant bsq-swap accounts
The user's default bsq-swap account is used instead.
2021-11-07 10:36:40 -03:00