This repository has been archived by the owner on Sep 6, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Add DAO code #34
Merged
ManfredKarrer
merged 96 commits into
bisq-network:master
from
ManfredKarrer:merged-voting
Aug 15, 2018
Merged
Add DAO code #34
ManfredKarrer
merged 96 commits into
bisq-network:master
from
ManfredKarrer:merged-voting
Aug 15, 2018
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Move code for broadcasting blind vote to p2p network and applying data to success handler of tx broadcast - Add popups when publishing blind vote
- 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
This was referenced Aug 15, 2018
ripcurlx
approved these changes
Aug 15, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
sqrrm
reviewed
Aug 15, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.