unexpected end of JSON input
Created by: david60
Hi,
I noticed a few errors like:
2016/06/01 13:38:07.311245 update.go:296: unexpected end of JSON input
which is from within ProcessConsensusChange. I believe this is because of lookups of storageobligations which have been deleted, but for which there are still action items. e.g. possibly a check like:
@@ -269,6 +278,9 @@ func (h *Host) ProcessConsensusChange(cc modules.ConsensusChange) {
bso := tx.Bucket(bucketStorageObligations)
for _, soid := range obligationIDs {
soBytes := bso.Get(soid[:])
+ if soBytes == nil {
+ continue
+ }
may help. This is might be a useful condition to catch, because I believe (but didn't check) an error here would abort the bolt db transaction and lose previous changes.
David