forked from TrueCloudLab/frostfs-node
[#486] innerring: Use fee provider and notary disabled flag in processors
Processors that use `invoke` package to make chain invocation should provide fee config and client with enabled or disabled notary support. If notary support is disabled, then functions from `invoke` package will perform ordinary method invocation with extra fee. Processors that use `morph/client` wrappers should check `notaryDisabled` flag to call corresponding wrapper function. Netmap processor omits some actions during validator syncronization if notary is disabled. Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
91a1896b8b
commit
f2562e8c47
16 changed files with 111 additions and 38 deletions
|
@ -41,7 +41,14 @@ func (rp *Processor) processPut(epoch uint64, id reputation.PeerID, value reputa
|
|||
args.SetPeerID(id)
|
||||
args.SetValue(value)
|
||||
|
||||
err := rp.reputationWrp.PutViaNotary(args)
|
||||
var err error
|
||||
|
||||
if rp.notaryDisabled {
|
||||
err = rp.reputationWrp.Put(args)
|
||||
} else {
|
||||
err = rp.reputationWrp.PutViaNotary(args)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
rp.log.Warn("can't send approval tx for reputation value",
|
||||
zap.String("peer_id", hex.EncodeToString(id.ToV2().GetValue())),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue