forked from TrueCloudLab/frostfs-node
[#976] morph: Implement missing methods for SwitchRPCGuardedActor
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
0a600521ad
commit
7ed07d2dfd
1 changed files with 14 additions and 0 deletions
|
@ -1,11 +1,13 @@
|
||||||
package client
|
package client
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/google/uuid"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/config/netmode"
|
"github.com/nspcc-dev/neo-go/pkg/config/netmode"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/core/transaction"
|
"github.com/nspcc-dev/neo-go/pkg/core/transaction"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/neorpc/result"
|
"github.com/nspcc-dev/neo-go/pkg/neorpc/result"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/rpcclient/actor"
|
"github.com/nspcc-dev/neo-go/pkg/rpcclient/actor"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/util"
|
"github.com/nspcc-dev/neo-go/pkg/util"
|
||||||
|
"github.com/nspcc-dev/neo-go/pkg/vm/stackitem"
|
||||||
)
|
)
|
||||||
|
|
||||||
type actorProvider interface {
|
type actorProvider interface {
|
||||||
|
@ -118,3 +120,15 @@ func (a *SwitchRPCGuardedActor) Sign(tx *transaction.Transaction) error {
|
||||||
func (a *SwitchRPCGuardedActor) SignAndSend(tx *transaction.Transaction) (util.Uint256, uint32, error) {
|
func (a *SwitchRPCGuardedActor) SignAndSend(tx *transaction.Transaction) (util.Uint256, uint32, error) {
|
||||||
return a.actorProvider.GetActor().SignAndSend(tx)
|
return a.actorProvider.GetActor().SignAndSend(tx)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (a *SwitchRPCGuardedActor) CallAndExpandIterator(contract util.Uint160, method string, maxItems int, params ...any) (*result.Invoke, error) {
|
||||||
|
return a.actorProvider.GetActor().CallAndExpandIterator(contract, method, maxItems, params...)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (a *SwitchRPCGuardedActor) TerminateSession(sessionID uuid.UUID) error {
|
||||||
|
return a.actorProvider.GetActor().TerminateSession(sessionID)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (a *SwitchRPCGuardedActor) TraverseIterator(sessionID uuid.UUID, iterator *result.Iterator, num int) ([]stackitem.Item, error) {
|
||||||
|
return a.actorProvider.GetActor().TraverseIterator(sessionID, iterator, num)
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue