Handle spammy logs for removed l-a-s options

This commit is contained in:
Rafael Taranto 2019-08-18 17:46:55 +01:00 committed by Josh Harvey
parent 91fc4e7cc2
commit fb42fc54a0

View file

@ -5,6 +5,8 @@ const configManager = require('./config-manager')
const logger = require('./logger')
const schema = require('../lamassu-schema.json')
const REMOVED_FIELDS = ['crossRefVerificationActive', 'crossRefVerificationThreshold']
function allScopes (cryptoScopes, machineScopes) {
const scopes = []
cryptoScopes.forEach(c => {
@ -128,6 +130,8 @@ function ensureConstraints (config) {
.then(() => {
config.every(fieldInstance => {
const fieldCode = fieldInstance.fieldLocator.code
if (_.includes(fieldCode, REMOVED_FIELDS)) return
const field = pickField(fieldCode)
if (!field) {
logger.warn('No such field: %s, %j', fieldCode, fieldInstance.fieldLocator.fieldScope)