Commit graph

5842 commits

Author SHA1 Message Date
Manfred Karrer
11f5135735
Refactor periodService
- Move mutual state to PeriodState
- Move stateless methods to BasePeriodService
- Use provider methods for accessing the state
- Use PeriodService for parser thread
- Use UserThreadPeriodService for userThread
- Use PhaseWrapper for holding enum and duration
- Move classes to vote.period package
2018-04-15 20:55:10 -05:00
Manfred Karrer
52c9a18411
Use params for period service
- Set initial durations at genesis height with default values of params
- Update durations when a changeParamEvent triggers a change
- Add Cycle class
- Add threadsafe wrapper
- Update UI period component
2018-04-14 23:25:52 -05:00
Manfred Karrer
1db7c87e2a
Merge branch 'master' into voting 2018-04-14 08:50:13 -05:00
Manfred Karrer
2dad464dcf
Merge branch 'master_origin' into voting 2018-04-14 08:48:23 -05:00
Manfred Karrer
d6337dcaaa
Merge branch 'master_origin' 2018-04-14 08:45:12 -05:00
Manfred Karrer
a0c2341bab
FIx threading and persistence issue
- Remove nodeExecutor.execute in stateService when processing the stateChangeEventsProviders to avoid delayed execution
- Comment out removal of local lists as we have the state not persisted yet
- Fix wrong phase check in BlindVoteService
- Rename getChainHeadHeight to getHeadHeight
2018-04-13 20:54:57 -05:00
Manfred Karrer
c279beec30
Refactor BlindVoteService to be executed on parser thread only 2018-04-13 19:53:33 -05:00
Manfred Karrer
b307cad261
Pass Transaction at creating proposal instead of lookup in wallet 2018-04-13 15:04:48 -05:00
Manfred Karrer
3b4b9ebc54
Make ProposalPayload immutable. Remove transaction from Proposal. 2018-04-13 13:48:20 -05:00
Manfred Karrer
9cbdceebc3
Remame DaoParam to Param and DaoParamService to ParamService 2018-04-13 12:30:46 -05:00
Manfred Karrer
18b05a1e78
Refactor: move param lasses to other package.
- Move classed of bisq.core.dao.vote.param to bisq.core.dao.vote.proposal.param
2018-04-13 12:11:35 -05:00
Manfred Karrer
df259d83e9
Refactor: move bisq.core.dao.param to bisq.core.dao.vote.param 2018-04-13 12:09:00 -05:00
Manfred Karrer
29149ebedb
Refactor handling of blocks in state class.
We create a immutable data unit Block which contains an immutable list of blockchain
related blocks (TxBlock) and an immutable list of non-blockchain related events.
Service classes which produces StateChangeEvents like ProposalService registers as
stateChangeEventListProvider and returns a list of StateChangeEvents when a new TxBlock
arrives. The stateService collect all those returned lists and put it to the newly created
immutable Block.

- Rename BsqBlock to TxBlock
- Create Block class containing txBlock as delegate and stateChangeEvents
- Add registerStateChangeEventListProvider method for clients processing a new TxBlock and producing stateChangeEvents
- Rename StateService listeners to blockListeners
- Pass Block instead of TxBlock at blockListeners.onBlockAdded
- Rename StateService.Listener to StateService.BlockListener
- Rename ParamChangeEvent to ChangeParamEvent
- Make ChangeParamEvent extending StateChangeEvent
- Make ChangeParam implementing ProtectedStoragePayload
2018-04-13 12:07:04 -05:00
Manfred Karrer
e90bc0b363
Rename BsqBlock to TxBlock 2018-04-13 09:48:12 -05:00
Manfred Karrer
21fe0a03b5
Refactoring: move vo one level up
- move bisq.core.dao.state.blockchain.vo to bisq.core.dao.state.blockchain
2018-04-13 09:46:11 -05:00
Manfred Karrer
7f1b0ebe09
Refactoring: Move package blockchain to bisq.core.dao.state.blockchain 2018-04-13 09:40:56 -05:00
Chris Beams
5613629bbe
Remove distZip.enabled statement from build.gradle
Setting this value to `false` was a minor optimization to improve build
speed, as we don't need both tar and zip dists to be built (and zip
actually takes a few seconds).

PR #1500 set it to `true`, because it ended up causing build failures
down the road. This commit removes the statement altogether, as `true`
is the default value anyway.
2018-04-13 10:20:29 +02:00
Manfred Karrer
b6d3b9b0d8
Rename ChainState to State 2018-04-11 22:41:03 -05:00
Manfred Karrer
1556e27909
Make blockchain data immutable (WIP)
- Remove immutable fields from Tx, TxInput adn TxOutput
- Add maps to ChainState for mutable fields
- Integrate BaseService in BlindVoteService
- Remove ValidationCandidate and BaseService
- Remove reset prameter at clone methods
- Move validation out of valueObject into Validator classes to keep valueObjects small
2018-04-11 20:37:45 -05:00
Manfred Karrer
89bee8ad89
Refactor BsqBlockChain (WIP)
- Move BsqBlockchain data to ChainState
- Add ChainStateService for accessing ChainState data
- Replace ReadableBsqBlockChain and WritableBsqBlockChain with ChainStateService
2018-04-11 15:31:08 -05:00
Manfred Karrer
de3e1615d9
Merge branch 'master_origin' into voting
# Conflicts:
#	src/main/java/bisq/desktop/app/BisqApp.java
2018-04-11 14:33:05 -05:00
Manfred Karrer
9b32ec8187
Merge branch 'master_origin' into voting
# Conflicts:
#	src/main/java/bisq/desktop/app/BisqApp.java
2018-04-11 14:32:22 -05:00
Manfred Karrer
c07822da37
Refactor proposal domain and make it more thread safe
- Add MyProposalService and ProposalListService to split up responsibility and threading boundaries
- Make ProposalService running in parser thread. Refactor resonsibilities.
- Add thread context aware listeners
- Use injectable NodeExecutor to make parsre thread accessible for thread context aware listeners
- Add stream() method and Iterable<T> interface to PersistableList
- Add ProposalFactory to create proposals from its payload
- Add ProposalPayload and BlindVoteList to Tx
- Add getLastOutput method to Tx
2018-04-11 13:51:19 -05:00
Christoph Atteneder
a426e8fe45
Merge pull request #1506 from ripcurlx/remove-duplicates-in-spread-view
Remove offer duplicates in spread view
2018-04-10 15:54:02 +02:00
Christoph Atteneder
5617a1581e
Fix camelCase typo 2018-04-10 15:49:50 +02:00
Christoph Atteneder
66fa7222ea
Remove usage of final 2018-04-10 15:48:38 +02:00
Christoph Atteneder
decbb4a10b
Fix code style 2018-04-10 15:48:21 +02:00
Christoph Atteneder
522a3e6a17
Merge pull request #1504 from abigail830/master
Add payment method for wechat & fixing a minor typo
2018-04-10 15:09:07 +02:00
Chris Beams
95daeead7e
Polish WeChat payment method support
- Use camel case spelling of 'WeChat' consistently
 - Organize imports with common layout (bisq-network/style#2)
2018-04-10 14:40:04 +02:00
Chris Beams
e8d084df31
Merge branch 'master' into abigail830-master 2018-04-10 14:23:23 +02:00
Christoph Atteneder
400e291997
Make sure that offers with the same id are only counted once 2018-04-10 12:22:16 +02:00
SaraQian
abf36b973c Optimize imports 2018-04-10 10:48:45 +08:00
SaraQian
0ff288de09 Optimize imports 2018-04-10 10:38:05 +08:00
Manfred Karrer
a5a22b1edb
Merge pull request #2 from ManfredKarrer/revert-1-periodservice-cycles
Revert "Periodservice cycles"
2018-04-09 13:00:11 -05:00
Manfred Karrer
89f3841cb2
Revert "Periodservice cycles" 2018-04-09 12:59:51 -05:00
Manfred Karrer
7cf9935f29
Merge pull request #1 from sqrrm/periodservice-cycles
Periodservice cycles
2018-04-09 12:12:04 -05:00
Manfred Karrer
e9e656f85b
Merge pull request #1505 from ManfredKarrer/master
Reorg imports
2018-04-09 08:28:22 -05:00
Manfred Karrer
1c7af0e7ee
Apply reorganize imports 2018-04-09 08:24:40 -05:00
Manfred Karrer
1cbce02465
Merge branch 'master_origin' 2018-04-09 08:10:52 -05:00
Chris Beams
4890eb5d8b
Merge pull request #1502 from ManfredKarrer/master
Refactor setup code
2018-04-09 12:28:07 +02:00
Christoph Atteneder
60db21f72a
Changed import style 2018-04-09 10:08:36 +02:00
SaraQian
58acd3b47d Adding payment method: Wechat 2018-04-09 11:28:14 +08:00
SaraQian
c2e12ad5ee Fixing a minor typo for validator param 2018-04-09 10:06:40 +08:00
sqrrm
e5151387c6
Merge remote-tracking branch 'manfred/voting' into periodservice-rework 2018-04-08 15:07:32 +02:00
Manfred Karrer
80221720cb
Refactor and improve Issuance domain. Add issued amount to UI
- Add VoteResultService for all proposals
- Use stake instead of nr. of votes for majority data view calculation
- Use IssuanceService fro compensation requests
- Add more checks at issuance
- Use secondary sort by hex of hash for getMajorityHash
- Add issued amount to dashboard view
2018-04-07 23:38:46 -05:00
Manfred Karrer
1a08030ba3
Move vote classes one level down 2018-04-07 21:23:43 -05:00
Manfred Karrer
d06b067aa5
Renaming
- VoteResult to Vote
- LongVoteResult to LongVote
- BooleanVoteResult to BooleanVote
2018-04-07 21:22:47 -05:00
Manfred Karrer
585478fef9
Rename package result to voteresult 2018-04-07 21:11:07 -05:00
Manfred Karrer
819f8e472f
Add isTxInCorrectCycle checks with correct chainHeight 2018-04-07 20:13:47 -05:00
Manfred Karrer
2e5d5d2191
Pass chainHeight to period service. 2018-04-07 19:29:09 -05:00