[#1637] go.mod: Update neo-go to v0.99.1

Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
Evgenii Stratonikov 2022-07-28 19:22:32 +03:00 committed by fyrchik
parent 71fd86f220
commit 07465849a4
45 changed files with 140 additions and 143 deletions

View file

@ -14,7 +14,7 @@ import (
"github.com/nspcc-dev/neo-go/pkg/core/transaction"
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
"github.com/nspcc-dev/neo-go/pkg/encoding/fixedn"
"github.com/nspcc-dev/neo-go/pkg/rpc/client"
"github.com/nspcc-dev/neo-go/pkg/rpcclient"
sc "github.com/nspcc-dev/neo-go/pkg/smartcontract"
"github.com/nspcc-dev/neo-go/pkg/smartcontract/trigger"
"github.com/nspcc-dev/neo-go/pkg/util"
@ -44,7 +44,7 @@ type Client struct {
logger *logger.Logger // logging component
client *client.WSClient // neo-go websocket client
client *rpcclient.WSClient // neo-go websocket client
acc *wallet.Account // neo account
@ -62,7 +62,7 @@ type Client struct {
switchLock *sync.RWMutex
// channel for ws notifications
notifications chan client.Notification
notifications chan rpcclient.Notification
// channel for internal stop
closeChan chan struct{}
@ -194,7 +194,7 @@ func (c *Client) Invoke(contract util.Uint160, fee fixedn.Fixed8, method string,
},
}
cosignerAcc := []client.SignerAccount{
cosignerAcc := []rpcclient.SignerAccount{
{
Signer: cosigner[0],
Account: c.acc,
@ -569,7 +569,7 @@ func (c *Client) IsValidScript(script []byte, signers []transaction.Signer) (res
// notification from the connected RPC node.
// Channel is closed when connection to the RPC node has been
// lost without the possibility of recovery.
func (c *Client) NotificationChannel() <-chan client.Notification {
func (c *Client) NotificationChannel() <-chan rpcclient.Notification {
return c.notifications
}

View file

@ -10,7 +10,7 @@ import (
lru "github.com/hashicorp/golang-lru"
"github.com/nspcc-dev/neo-go/pkg/core/transaction"
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
"github.com/nspcc-dev/neo-go/pkg/rpc/client"
"github.com/nspcc-dev/neo-go/pkg/rpcclient"
"github.com/nspcc-dev/neo-go/pkg/util"
"github.com/nspcc-dev/neo-go/pkg/wallet"
"github.com/nspcc-dev/neofs-node/pkg/util/logger"
@ -38,7 +38,7 @@ type cfg struct {
endpoints []Endpoint
singleCli *client.WSClient // neo-go client for single client mode
singleCli *rpcclient.WSClient // neo-go client for single client mode
inactiveModeCb Callback
}
@ -101,7 +101,7 @@ func New(key *keys.PrivateKey, opts ...Option) (*Client, error) {
signer: cfg.signer,
cfg: *cfg,
switchLock: &sync.RWMutex{},
notifications: make(chan client.Notification),
notifications: make(chan rpcclient.Notification),
subscribedEvents: make(map[util.Uint160]string),
subscribedNotaryEvents: make(map[util.Uint160]string),
closeChan: make(chan struct{}),
@ -136,11 +136,11 @@ func New(key *keys.PrivateKey, opts ...Option) (*Client, error) {
return cli, nil
}
func newWSClient(cfg cfg, endpoint string) (*client.WSClient, error) {
return client.NewWS(
func newWSClient(cfg cfg, endpoint string) (*rpcclient.WSClient, error) {
return rpcclient.NewWS(
cfg.ctx,
endpoint,
client.Options{DialTimeout: cfg.dialTimeout},
rpcclient.Options{DialTimeout: cfg.dialTimeout},
)
}
@ -223,7 +223,7 @@ func WithEndpoints(endpoints ...Endpoint) Option {
// to use it for requests.
//
// Passed client must already be initialized.
func WithSingleClient(cli *client.WSClient) Option {
func WithSingleClient(cli *rpcclient.WSClient) Option {
return func(c *cfg) {
c.singleCli = cli
}

View file

@ -8,7 +8,7 @@ import (
"github.com/nspcc-dev/neo-go/pkg/core/transaction"
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
"github.com/nspcc-dev/neo-go/pkg/rpc/client"
"github.com/nspcc-dev/neo-go/pkg/rpcclient"
"github.com/nspcc-dev/neo-go/pkg/smartcontract"
"github.com/nspcc-dev/neo-go/pkg/util"
"github.com/nspcc-dev/neo-go/pkg/vm/stackitem"
@ -98,7 +98,7 @@ func (c *Client) NNSHash() (util.Uint160, error) {
return *nnsHash, nil
}
func nnsResolveItem(c *client.WSClient, nnsHash util.Uint160, domain string) (stackitem.Item, error) {
func nnsResolveItem(c *rpcclient.WSClient, nnsHash util.Uint160, domain string) (stackitem.Item, error) {
found, err := exists(c, nnsHash, domain)
if err != nil {
return nil, fmt.Errorf("could not check presence in NNS contract for %s: %w", domain, err)
@ -130,7 +130,7 @@ func nnsResolveItem(c *client.WSClient, nnsHash util.Uint160, domain string) (st
return result.Stack[0], nil
}
func nnsResolve(c *client.WSClient, nnsHash util.Uint160, domain string) (util.Uint160, error) {
func nnsResolve(c *rpcclient.WSClient, nnsHash util.Uint160, domain string) (util.Uint160, error) {
res, err := nnsResolveItem(c, nnsHash, domain)
if err != nil {
return util.Uint160{}, err
@ -152,7 +152,7 @@ func nnsResolve(c *client.WSClient, nnsHash util.Uint160, domain string) (util.U
return util.Uint160DecodeStringLE(string(bs))
}
func exists(c *client.WSClient, nnsHash util.Uint160, domain string) (bool, error) {
func exists(c *rpcclient.WSClient, nnsHash util.Uint160, domain string) (bool, error) {
result, err := c.InvokeFunction(nnsHash, "isAvailable", []smartcontract.Parameter{
{
Type: smartcontract.StringType,