mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-24 12:46:45 +00:00
version check: test against predefined address
This commit is contained in:
parent
77d3c848f9
commit
ea36c63ebb
1 changed files with 5 additions and 0 deletions
|
@ -54,6 +54,11 @@ public class VersionCheckService extends ScheduledService<VersionUpdatedEvent> {
|
||||||
private boolean verifySignature(VersionCheck versionCheck) {
|
private boolean verifySignature(VersionCheck versionCheck) {
|
||||||
try {
|
try {
|
||||||
for(String addressString : versionCheck.signatures.keySet()) {
|
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);
|
String signature = versionCheck.signatures.get(addressString);
|
||||||
ECKey signedMessageKey = ECKey.signedMessageToKey(versionCheck.version, signature, false);
|
ECKey signedMessageKey = ECKey.signedMessageToKey(versionCheck.version, signature, false);
|
||||||
Address providedAddress = Address.fromString(addressString);
|
Address providedAddress = Address.fromString(addressString);
|
||||||
|
|
Loading…
Reference in a new issue