Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.

Commit

Permalink
Add modifierTypeId to logs
Browse files Browse the repository at this point in the history
  • Loading branch information
catena2w committed Oct 27, 2017
1 parent d46d2b9 commit d1e4ef3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/scala/scorex/core/NodeViewHolder.scala
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ trait NodeViewHolder[P <: Proposition, TX <: Transaction[P], PMOD <: PersistentN
if (!history().contains(pmod.id)) {
notifySubscribers(EventType.StartingPersistentModifierApplication, StartingPersistentModifierApplication(pmod))

log.info(s"Apply modifier to nodeViewHolder: ${Base58.encode(pmod.id)}")
log.info(s"Apply modifier ${pmod.encodedId} of type ${pmod.modifierTypeId} to nodeViewHolder")

history().append(pmod) match {
case Success((historyBeforeStUpdate, progressInfo)) =>
Expand All @@ -256,11 +256,11 @@ trait NodeViewHolder[P <: Proposition, TX <: Transaction[P], PMOD <: PersistentN
vault().scanPersistent(progressInfo.toApply)
}

log.info(s"Persistent modifier ${Base58.encode(pmod.id)} applied successfully")
log.info(s"Persistent modifier ${pmod.encodedId} applied successfully")
nodeView = (newHistory, newMinState, newVault, newMemPool)

case Failure(e) =>
log.warn(s"Can`t apply persistent modifier (id: ${Base58.encode(pmod.id)}, contents: $pmod) to minimal state", e)
log.warn(s"Can`t apply persistent modifier (id: ${pmod.encodedId}, contents: $pmod) to minimal state", e)
nodeView = (newHistory, minimalState(), vault(), memoryPool())
notifySubscribers(EventType.SyntacticallyFailedPersistentModifier, SyntacticallyFailedModification(pmod, e))
}
Expand All @@ -269,11 +269,11 @@ trait NodeViewHolder[P <: Proposition, TX <: Transaction[P], PMOD <: PersistentN
nodeView = (historyBeforeStUpdate, minimalState(), vault(), memoryPool())
}
case Failure(e) =>
log.warn(s"Can`t apply persistent modifier (id: ${Base58.encode(pmod.id)}, contents: $pmod) to history", e)
log.warn(s"Can`t apply persistent modifier (id: ${pmod.encodedId}, contents: $pmod) to history", e)
notifySubscribers(EventType.SyntacticallyFailedPersistentModifier, SyntacticallyFailedModification(pmod, e))
}
} else {
log.warn(s"Trying to apply modifier ${Base58.encode(pmod.id)} that's already in history")
log.warn(s"Trying to apply modifier ${pmod.encodedId} that's already in history")
}


Expand Down Expand Up @@ -348,7 +348,7 @@ trait NodeViewHolder[P <: Proposition, TX <: Transaction[P], PMOD <: PersistentN
txModify(lt.tx)

case lm: LocallyGeneratedModifier[PMOD] =>
log.info(s"Got locally generated modifier: ${Base58.encode(lm.pmod.id)}")
log.info(s"Got locally generated modifier ${lm.pmod.encodedId} of type ${lm.pmod.modifierTypeId}")
pmodModify(lm.pmod)
}

Expand Down

0 comments on commit d1e4ef3

Please sign in to comment.