Skip to content

Commit

Permalink
fix(log): add dest chain sendIBTP log
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasgw committed Jan 16, 2024
1 parent 5bd6821 commit 741a696
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/exchanger/direct_consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func (ex *Exchanger) listenIBTPFromDestAdaptForDirect(servicePair string) {
}
ex.logger.WithFields(logrus.Fields{"index": ibtp.Index, "type": ibtp.Type, "ibtp_id": ibtp.ID()}).Info("Receive ibtp from :", ex.destAdaptName)
index := ex.getCurrentIndexFromDest(ibtp)
ex.logger.Infof("current index from destAdaptor for ibtp: %s is %d", ibtp.ID(), index)

if index >= ibtp.Index {
if ibtp.Type == pb.IBTP_RECEIPT_ROLLBACK {
Expand All @@ -51,6 +52,7 @@ func (ex *Exchanger) listenIBTPFromDestAdaptForDirect(servicePair string) {
} else {
ex.sendIBTPForDirect(ex.destAdapt, ex.srcAdapt, ibtp, !ex.isIBTPBelongSrc(ibtp), false)
}
ex.logger.Infof("[direct-consumer] send IBTP [%s] returned", ibtp.ID())

if ex.isIBTPBelongSrc(ibtp) {
ex.destServiceMeta[ibtp.From].ReceiptCounter[ibtp.To] = ibtp.Index
Expand Down

0 comments on commit 741a696

Please sign in to comment.