-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: masternode list sync and block reward #240
Changes from all commits
5e5a9aa
80b41ce
861383a
5724ea7
6a9e8dd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -194,6 +194,22 @@ public Sha256Hash getConfirmedHashWithProRegTxHash() { | |
return confirmedHashWithProRegTxHash; | ||
} | ||
|
||
public int getType() { | ||
return type; | ||
} | ||
|
||
public boolean isHPMN() { | ||
return type == MasternodeType.HIGHPERFORMANCE.index; | ||
} | ||
Comment on lines
+201
to
+203
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is required by Dash Wallet for Masternode APY. |
||
|
||
public int getPlatformHTTPPort() { | ||
return platformHTTPPort; | ||
} | ||
|
||
public KeyId getPlatformNodeId() { | ||
return platformNodeId; | ||
} | ||
|
||
void updateConfirmedHashWithProRegTxHash() { | ||
try { | ||
UnsafeByteArrayOutputStream bos = new UnsafeByteArrayOutputStream(64); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -411,8 +411,8 @@ public void close() { | |
quorumState.removeEventListeners(blockChain.getBlockChain(), peerGroup); | ||
quorumRotationState.removeEventListeners(blockChain.getBlockChain(), peerGroup); | ||
// reset state of chain sync | ||
quorumState.initChainTipSyncComplete = false; | ||
quorumRotationState.initChainTipSyncComplete = false; | ||
quorumState.close(); | ||
quorumRotationState.close(); | ||
Comment on lines
-414
to
+415
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. need to reset more of the sync state than this one value. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One reason for "Syncing..." was that it was waiting for a reply to a message sent before the network was completely disconnected. After starting up, the |
||
|
||
try { | ||
threadPool.shutdown(); | ||
|
@@ -450,12 +450,14 @@ public boolean isQuorumRotationEnabled(LLMQParameters.LLMQType type) { | |
return params.getLlmqDIP0024InstantSend() == type && quorumRotationActive; | ||
} | ||
|
||
// TODO: this needs an argument for LLMQType | ||
public SimplifiedMasternodeList getListAtChainTip() { | ||
return getMasternodeList(); | ||
if (quorumState.getMasternodeListAtTip() != null) { | ||
return quorumState.getMasternodeListAtTip(); | ||
} else { | ||
return quorumRotationState.getMnListAtH(); | ||
} | ||
} | ||
Comment on lines
453
to
459
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This helps fix a sync issue. When checking if |
||
|
||
// TODO: this needs an argument for LLMQType | ||
public SimplifiedQuorumList getQuorumListAtTip(LLMQParameters.LLMQType llmqType) { | ||
if (!isQuorumRotationEnabled(llmqType)) { | ||
return quorumState.quorumList; | ||
|
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.
This updates for the new Treasury size of 20% once v20 is active.