Skip to content

Commit d1614d0

Browse files
committed
change pipeline of update utxo state at inter nvh view
1 parent e61f6b7 commit d1614d0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/main/scala/encry/nvg/IntermediaryNVHView.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ class IntermediaryNVHView(settings: EncryAppSettings, ntp: NetworkTimeProvider,
6969
def viewReceive(history: ActorRef, state: ActorRef, stateReader: UtxoStateReader): Receive = {
7070

7171
case RegisterState(reader) => context.become(viewReceive(history, sender(), reader))
72-
case reader: UtxoStateReader => context.become(viewReceive(history, state, reader))
72+
case reader: UtxoStateReader =>
73+
logger.info("Update reader at inter nvh view")
74+
context.become(viewReceive(history, state, reader))
7375

7476
case GetDataFromCurrentView(f: (CurrentView[HistoryReader, UtxoStateReader, WalletReader] => CandidateEnvelope)) =>
7577
logger.info("Receive GetDataFromCurrentView on nvh")

src/main/scala/encry/nvg/NVHState.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ class NVHState(influxRef: Option[ActorRef], var historyReader: HistoryReader, se
5151
}
5252
state = stateAfterApply
5353
logger.info(s"Successfully apply modifier: ${Algos.encode(modifier.id)} of type ${modifier.modifierTypeId}")
54-
context.parent ! ModifierApplied(modifier)
5554
context.parent ! UtxoStateReader(state)
55+
context.parent ! ModifierApplied(modifier)
5656
case Left(e: List[ModifierApplyError]) =>
5757
logger.info(s"Application to state failed cause $e")
5858
context.parent ! ApplyFailed(modifier, e)

0 commit comments

Comments
 (0)