better deserialization log

This commit is contained in:
Jacek Sieka 2020-05-20 15:41:02 +02:00
parent 202bbbab6c
commit 23daa966be
No known key found for this signature in database
GPG Key ID: A1B09461ABB656B8
1 changed files with 2 additions and 1 deletions

View File

@ -76,7 +76,8 @@ proc get(db: BeaconChainDB, key: openArray[byte], T: typedesc): Opt[T] =
except SerializationError as e: except SerializationError as e:
# If the data can't be deserialized, it could be because it's from a # If the data can't be deserialized, it could be because it's from a
# version of the software that uses a different SSZ encoding # version of the software that uses a different SSZ encoding
warn "Unable to deserialize data, old database?", err = e.msg warn "Unable to deserialize data, old database?",
err = e.msg, typ = name(T), dataLen = data.len
discard discard
discard db.backend.get(key, decode).expect("working database") discard db.backend.get(key, decode).expect("working database")