Skip to content
This repository has been archived by the owner on Sep 6, 2018. It is now read-only.

Add DAO code #34

Merged
merged 96 commits into from Aug 15, 2018
Merged

Conversation

ManfredKarrer
Copy link
Member

No description provided.

- Move code for broadcasting blind vote to p2p network and applying data to success handler of tx broadcast
- Add popups when publishing blind vote
- VoteResult to Vote
- LongVoteResult to LongVote
- BooleanVoteResult to BooleanVote
- 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
- Move TxIdIndexTuple as inner class to TxOutput and rename it to  Key
- Remove TxIdIndexTuple from PB (was never used)
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
- If executeOnUserThread is set call listeners directly without using executor.execute() to avoid that we need to wait until running task is complete
- Dont use nodExecutor at readPersisted as that is called at startup so no need to change thread here
- Remove getExecutor and execute default methods from ThreadContextAwareListener
- Add executeOnUserThread default method to ThreadContextAwareListener
- Add notifyHashMapChangedListenersOnRemove and notifyHashMapChangedListenersOnAdded to P2PDataStorage
- Break up state and stateService
- Add UserThreadStateService for access from user thread
- Map state changes to UserThreadStateService
- Add execute method to ThreadAwareListener
- Rename classed, methods and fields with *BsqBlock* to *TxBlock*
- fix row display in proposal display
# Conflicts:
#	src/main/proto/pb.proto

Merge branch 'refact-generics' into voting

# Conflicts:
#	src/main/java/bisq/desktop/main/dao/DaoView.java
#	src/main/java/bisq/desktop/main/dao/voting/VotingView.java
#	src/main/java/bisq/desktop/main/dao/wallet/send/BsqSendView.java
#	src/main/java/bisq/desktop/util/GUIUtil.java
- Add BaseTx class containing only immutable blockchain-only data which
is common in sub classes
- RawTx extends BaseTx
- TempTx extends BaseTx and has mutable data which can be altered
during tx parsing. TempTx is only used during parsing and gets converted
to teh immutable Tx when tx parsing is completed.
- Tx extends BaseTx and is immutable and used to be stored in the Block.
- Add BaseTxOutput and BaseBlock class containing only immutable
blockchain-only data which is common in sub classes
- RawTxOutput extends BaseTxOutput, RawBlock extends BaseBlock
- TempTxOutput extends BaseTxOutput and has mutable data which can be
altered during tx parsing. TempTxOutput is only used during parsing
and gets converted to the immutable TxOutput when tx parsing is
completed.
- TxOutput extends BaseTx and is immutable and used to be stored in
the Block.
- Block extends BaseBlock and is persisted with the BsqState. The tx
list is not a immutable list bu the transactions in there are immutable.
Transactions gets added during parsing to the block which was gets added
to the BsqState when parsing starts.

- Change block time from seconds to ms
- Rename bisq.core.dao.state.ext package to bisq.core.dao.state.governance
We can use the txId as unique ID
Make Vote to BooleanVote
# Conflicts:
#	src/main/resources/i18n/displayStrings.properties

Merge branch 'master' into voting

# Conflicts:
#	build.gradle
Copy link
Member

@ripcurlx ripcurlx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@ManfredKarrer ManfredKarrer merged commit 2881cfe into bisq-network:master Aug 15, 2018
Copy link
Member

@sqrrm sqrrm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@ManfredKarrer ManfredKarrer deleted the merged-voting branch August 16, 2018 16:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants