mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-22 14:42:37 +01:00
Remove CapabilityRequiringPayload from GetBlocksRequest
We remove CapabilityRequiringPayload as it would cause problems if the lite node connects to a new seed node and they have not exchanged capabilities already. We need to improve capability handling the we can re-enable it again. As this message is sent any only to seed nodes it does not has any effect. Even if a lite node receives it it will be simply ignored.
This commit is contained in:
parent
e6179990bd
commit
9f84f023fa
1 changed files with 10 additions and 7 deletions
|
@ -21,10 +21,8 @@ import bisq.network.p2p.DirectMessage;
|
|||
import bisq.network.p2p.NodeAddress;
|
||||
import bisq.network.p2p.SendersNodeAddressMessage;
|
||||
import bisq.network.p2p.SupportedCapabilitiesMessage;
|
||||
import bisq.network.p2p.storage.payload.CapabilityRequiringPayload;
|
||||
|
||||
import bisq.common.app.Capabilities;
|
||||
import bisq.common.app.Capability;
|
||||
import bisq.common.app.Version;
|
||||
import bisq.common.proto.network.NetworkEnvelope;
|
||||
|
||||
|
@ -36,12 +34,17 @@ import lombok.extern.slf4j.Slf4j;
|
|||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
// TODO We remove CapabilityRequiringPayload as it would cause problems if the lite node connects to a new seed node and
|
||||
// they have not exchanged capabilities already. We need to improve capability handling the we can re-enable it again.
|
||||
// As this message is sent any only to seed nodes it does not has any effect. Even if a lite node receives it it will be
|
||||
// simply ignored.
|
||||
|
||||
// This message is sent only to full DAO nodes
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Getter
|
||||
@Slf4j
|
||||
public final class GetBlocksRequest extends NetworkEnvelope implements DirectMessage, SendersNodeAddressMessage,
|
||||
CapabilityRequiringPayload, SupportedCapabilitiesMessage {
|
||||
/*CapabilityRequiringPayload, */SupportedCapabilitiesMessage {
|
||||
private final int fromBlockHeight;
|
||||
private final int nonce;
|
||||
|
||||
|
@ -105,10 +108,10 @@ public final class GetBlocksRequest extends NetworkEnvelope implements DirectMes
|
|||
messageVersion);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Capabilities getRequiredCapabilities() {
|
||||
return new Capabilities(Capability.DAO_FULL_NODE);
|
||||
}
|
||||
// @Override
|
||||
// public Capabilities getRequiredCapabilities() {
|
||||
// return new Capabilities(Capability.DAO_FULL_NODE);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
|
Loading…
Add table
Reference in a new issue