Do not log full tiler object in case of an invalid Filter

Instead log signerPubKeyAsHex and creation date. We have currently the old filter still around (intended) so we get that log called and it would confuse ppl reading the log without knowing more about the context.
This commit is contained in:
chimp1984 2020-10-07 09:42:01 -05:00
parent 723a1f5cf9
commit 076af0a3e1
No known key found for this signature in database
GPG Key ID: 9801B4EC591F90E3

View File

@ -56,6 +56,7 @@ import java.math.BigInteger;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@ -586,7 +587,11 @@ public class FilterManager {
private boolean isFilterPublicKeyInList(Filter filter) {
String signerPubKeyAsHex = filter.getSignerPubKeyAsHex();
if (!isPublicKeyInList(signerPubKeyAsHex)) {
log.warn("signerPubKeyAsHex from filter is not part of our pub key list. filter={}, publicKeys={}", filter, publicKeys);
log.warn("Invalid filter (expected case for pre v1.3.9 filter as we still keep that in the network " +
"but the new version does not recognize it as valid filter): " +
"signerPubKeyAsHex from filter is not part of our pub key list. " +
"signerPubKeyAsHex={}, publicKeys={}, filterCreationDate={}",
signerPubKeyAsHex, publicKeys, new Date(filter.getCreationDate()));
return false;
}
return true;