forked from TrueCloudLab/frostfs-node
[#794] ir/neofs: Print tx IDs in LE on Withdraw and Deposit events
IDs come from NeoFS contract in big endian, but it is customary to write in the node logs in little endian. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
60b3bf3ce6
commit
ba234699cd
1 changed files with 3 additions and 2 deletions
|
@ -3,6 +3,7 @@ package neofs
|
|||
import (
|
||||
"encoding/hex"
|
||||
|
||||
"github.com/nspcc-dev/neo-go/pkg/util/slice"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/morph/event"
|
||||
neofsEvent "github.com/nspcc-dev/neofs-node/pkg/morph/event/neofs"
|
||||
"go.uber.org/zap"
|
||||
|
@ -12,7 +13,7 @@ func (np *Processor) handleDeposit(ev event.Event) {
|
|||
deposit := ev.(neofsEvent.Deposit)
|
||||
np.log.Info("notification",
|
||||
zap.String("type", "deposit"),
|
||||
zap.String("id", hex.EncodeToString(deposit.ID())))
|
||||
zap.String("id", hex.EncodeToString(slice.CopyReverse(deposit.ID()))))
|
||||
|
||||
// send event to the worker pool
|
||||
|
||||
|
@ -28,7 +29,7 @@ func (np *Processor) handleWithdraw(ev event.Event) {
|
|||
withdraw := ev.(neofsEvent.Withdraw)
|
||||
np.log.Info("notification",
|
||||
zap.String("type", "withdraw"),
|
||||
zap.String("id", hex.EncodeToString(withdraw.ID())))
|
||||
zap.String("id", hex.EncodeToString(slice.CopyReverse(withdraw.ID()))))
|
||||
|
||||
// send event to the worker pool
|
||||
|
||||
|
|
Loading…
Reference in a new issue