Add NO_ADDRESS_PRE_FIX capability.

Add `boolean contains(Capability capability)` method
This commit is contained in:
chimp1984 2020-10-07 09:43:39 -05:00
parent 35e0c34c74
commit 9404e8fa87
No known key found for this signature in database
GPG key ID: 9801B4EC591F90E3
3 changed files with 8 additions and 2 deletions

View file

@ -98,6 +98,10 @@ public class Capabilities {
return this.capabilities.containsAll(Arrays.asList(capabilities));
}
public boolean contains(Capability capability) {
return this.capabilities.contains(capability);
}
public boolean isEmpty() {
return capabilities.isEmpty();
}

View file

@ -40,5 +40,6 @@ public enum Capability {
SIGNED_ACCOUNT_AGE_WITNESS, // Supports the signed account age witness feature
MEDIATION, // Supports mediation feature
REFUND_AGENT, // Supports refund agents
TRADE_STATISTICS_HASH_UPDATE // We changed the hash method in 1.2.0 and that requires update to 1.2.2 for handling it correctly, otherwise the seed nodes have to process too much data.
TRADE_STATISTICS_HASH_UPDATE, // We changed the hash method in 1.2.0 and that requires update to 1.2.2 for handling it correctly, otherwise the seed nodes have to process too much data.
NO_ADDRESS_PRE_FIX // At 1.4.0 we removed the prefix filter for mailbox messages. If a peer has that capability we do not sent the prefix.
}

View file

@ -39,7 +39,8 @@ public class CoreNetworkCapabilities {
Capability.MEDIATION,
Capability.SIGNED_ACCOUNT_AGE_WITNESS,
Capability.REFUND_AGENT,
Capability.TRADE_STATISTICS_HASH_UPDATE
Capability.TRADE_STATISTICS_HASH_UPDATE,
Capability.NO_ADDRESS_PRE_FIX
);
if (config.daoActivated) {