Browse Source

version check: test against predefined address

bwt
Craig Raw 4 years ago
parent
commit
ea36c63ebb
  1. 5
      src/main/java/com/sparrowwallet/sparrow/net/VersionCheckService.java

5
src/main/java/com/sparrowwallet/sparrow/net/VersionCheckService.java

@ -54,6 +54,11 @@ public class VersionCheckService extends ScheduledService<VersionUpdatedEvent> {
private boolean verifySignature(VersionCheck versionCheck) {
try {
for(String addressString : versionCheck.signatures.keySet()) {
if(!addressString.equals("1LiJx1HQ49L2LzhBwbgwXdHiGodvPg5YaV")) {
log.warn("Invalid address for version check " + addressString);
continue;
}
String signature = versionCheck.signatures.get(addressString);
ECKey signedMessageKey = ECKey.signedMessageToKey(versionCheck.version, signature, false);
Address providedAddress = Address.fromString(addressString);

Loading…
Cancel
Save