forked from TrueCloudLab/frostfs-node
[#787] morph: Return VUB from Invoke
method
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
5466e88444
commit
518f3baf41
25 changed files with 69 additions and 48 deletions
|
@ -246,7 +246,7 @@ type testMorphClient struct {
|
|||
batchTransferedGas []batchTransferGas
|
||||
}
|
||||
|
||||
func (c *testMorphClient) Invoke(contract util.Uint160, fee fixedn.Fixed8, method string, args ...any) error {
|
||||
func (c *testMorphClient) Invoke(contract util.Uint160, fee fixedn.Fixed8, method string, args ...any) (uint32, error) {
|
||||
c.invokedMethods = append(c.invokedMethods,
|
||||
invokedMethod{
|
||||
contract: contract,
|
||||
|
@ -254,7 +254,7 @@ func (c *testMorphClient) Invoke(contract util.Uint160, fee fixedn.Fixed8, metho
|
|||
method: method,
|
||||
args: args,
|
||||
})
|
||||
return nil
|
||||
return 0, nil
|
||||
}
|
||||
|
||||
func (c *testMorphClient) TransferGas(receiver util.Uint160, amount fixedn.Fixed8) error {
|
||||
|
|
|
@ -30,7 +30,7 @@ func (ap *Processor) processEmit() bool {
|
|||
}
|
||||
|
||||
// there is no signature collecting, so we don't need extra fee
|
||||
err := ap.morphClient.Invoke(contract, 0, emitMethod)
|
||||
_, err := ap.morphClient.Invoke(contract, 0, emitMethod)
|
||||
if err != nil {
|
||||
ap.log.Warn(logs.AlphabetCantInvokeAlphabetEmitMethod, zap.String("error", err.Error()))
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ type (
|
|||
}
|
||||
|
||||
morphClient interface {
|
||||
Invoke(contract util.Uint160, fee fixedn.Fixed8, method string, args ...any) error
|
||||
Invoke(contract util.Uint160, fee fixedn.Fixed8, method string, args ...any) (uint32, error)
|
||||
TransferGas(receiver util.Uint160, amount fixedn.Fixed8) error
|
||||
BatchTransferGas(receivers []util.Uint160, amount fixedn.Fixed8) error
|
||||
}
|
||||
|
|
|
@ -23,7 +23,8 @@ func (w *netmapClientWrapper) UpdatePeerState(p netmapclient.UpdatePeerPrm) erro
|
|||
}
|
||||
|
||||
func (w *netmapClientWrapper) MorphNotaryInvoke(contract util.Uint160, fee fixedn.Fixed8, nonce uint32, vub *uint32, method string, args ...any) error {
|
||||
return w.netmapClient.Morph().NotaryInvoke(contract, fee, nonce, vub, method, args...)
|
||||
_, err := w.netmapClient.Morph().NotaryInvoke(contract, fee, nonce, vub, method, args...)
|
||||
return err
|
||||
}
|
||||
|
||||
func (w *netmapClientWrapper) ContractAddress() util.Uint160 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue