mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 09:52:23 +01:00
Merge pull request #3151 from chimp1984/dont-send-bsq-blocks-to-full-nodes
Do not send BSQ blocks to full nodes
This commit is contained in:
commit
4478476763
@ -31,7 +31,7 @@ public enum Capability {
|
||||
PROPOSAL,
|
||||
BLIND_VOTE,
|
||||
ACK_MSG,
|
||||
BSQ_BLOCK,
|
||||
RECEIVE_BSQ_BLOCK,
|
||||
DAO_STATE,
|
||||
BUNDLE_OF_ENVELOPES,
|
||||
SIGNED_ACCOUNT_AGE_WITNESS
|
||||
|
@ -64,6 +64,6 @@ public final class NewBlockBroadcastMessage extends BroadcastMessage implements
|
||||
|
||||
@Override
|
||||
public Capabilities getRequiredCapabilities() {
|
||||
return new Capabilities(Capability.BSQ_BLOCK);
|
||||
return new Capabilities(Capability.RECEIVE_BSQ_BLOCK);
|
||||
}
|
||||
}
|
||||
|
@ -29,10 +29,10 @@ import lombok.extern.slf4j.Slf4j;
|
||||
public class CoreNetworkCapabilities {
|
||||
public static void setSupportedCapabilities(BisqEnvironment bisqEnvironment) {
|
||||
Capabilities.app.addAll(Capability.TRADE_STATISTICS, Capability.TRADE_STATISTICS_2, Capability.ACCOUNT_AGE_WITNESS, Capability.ACK_MSG);
|
||||
Capabilities.app.addAll(Capability.BUNDLE_OF_ENVELOPES,Capability.SIGNED_ACCOUNT_AGE_WITNESS);
|
||||
Capabilities.app.addAll(Capability.BUNDLE_OF_ENVELOPES, Capability.SIGNED_ACCOUNT_AGE_WITNESS);
|
||||
|
||||
if (BisqEnvironment.isDaoActivated(bisqEnvironment)) {
|
||||
Capabilities.app.addAll(Capability.PROPOSAL, Capability.BLIND_VOTE, Capability.BSQ_BLOCK, Capability.DAO_STATE);
|
||||
Capabilities.app.addAll(Capability.PROPOSAL, Capability.BLIND_VOTE, Capability.DAO_STATE);
|
||||
|
||||
maybeApplyDaoFullMode(bisqEnvironment);
|
||||
}
|
||||
@ -46,6 +46,10 @@ public class CoreNetworkCapabilities {
|
||||
if (isFullDaoNode != null && !isFullDaoNode.isEmpty() && isFullDaoNode.toLowerCase().equals("true")) {
|
||||
log.info("Set Capability.DAO_FULL_NODE");
|
||||
Capabilities.app.addAll(Capability.DAO_FULL_NODE);
|
||||
} else {
|
||||
// A lite node has the capability to receive bsq blocks. We do not want to send BSQ blocks to full nodes
|
||||
// as they ignore them anyway.
|
||||
Capabilities.app.addAll(Capability.RECEIVE_BSQ_BLOCK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user