forked from TrueCloudLab/frostfs-node
[#971] *: Add notification TX hash to neofs/netmap morph client calls
Add hash of the TX that generated notification to neofs/netmap event structures. Adapt all neofs/netmap wrapper calls to new structures. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
c25f5a86ae
commit
bad739258e
19 changed files with 220 additions and 60 deletions
|
@ -1,6 +1,7 @@
|
|||
package balance
|
||||
|
||||
import (
|
||||
neofscontract "github.com/nspcc-dev/neofs-node/pkg/morph/client/neofs/wrapper"
|
||||
balanceEvent "github.com/nspcc-dev/neofs-node/pkg/morph/event/balance"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
@ -13,11 +14,15 @@ func (bp *Processor) processLock(lock *balanceEvent.Lock) {
|
|||
return
|
||||
}
|
||||
|
||||
err := bp.neofsClient.Cheque(
|
||||
lock.ID(),
|
||||
lock.User(),
|
||||
bp.converter.ToFixed8(lock.Amount()),
|
||||
lock.LockAccount())
|
||||
prm := neofscontract.ChequePrm{}
|
||||
|
||||
prm.SetID(lock.ID())
|
||||
prm.SetUser(lock.User())
|
||||
prm.SetAmount(bp.converter.ToFixed8(lock.Amount()))
|
||||
prm.SetLock(lock.LockAccount())
|
||||
prm.SetHash(lock.TxHash())
|
||||
|
||||
err := bp.neofsClient.Cheque(prm)
|
||||
if err != nil {
|
||||
bp.log.Error("can't send lock asset tx", zap.Error(err))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue