From ea36c63ebb828eabb64bf25e0bb7adc284fe9ab5 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Sun, 20 Sep 2020 15:09:54 +0200 Subject: [PATCH] version check: test against predefined address --- .../com/sparrowwallet/sparrow/net/VersionCheckService.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/sparrowwallet/sparrow/net/VersionCheckService.java b/src/main/java/com/sparrowwallet/sparrow/net/VersionCheckService.java index e3b30ff6..bf60ca9f 100644 --- a/src/main/java/com/sparrowwallet/sparrow/net/VersionCheckService.java +++ b/src/main/java/com/sparrowwallet/sparrow/net/VersionCheckService.java @@ -54,6 +54,11 @@ public class VersionCheckService extends ScheduledService { 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);