Skip to content
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

Remove CapabilityRequiringPayload from GetBlocksRequest #3259

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@
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;

Expand All @@ -36,12 +34,17 @@

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;

Expand Down Expand Up @@ -105,10 +108,10 @@ public static NetworkEnvelope fromProto(protobuf.GetBlocksRequest proto, int mes
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() {
Expand Down