client/cli: add network option to the RPC client

It doesn't affect anything yet, but it's going to be used in the future for
network-specific behavior. It also renames short '--timeout' form to '-s'
avoiding conlict with '-t' used for '--testnet'.
This commit is contained in:
Roman Khimov 2020-06-18 09:43:37 +03:00
parent 16ce63e653
commit d22286cbbc
5 changed files with 23 additions and 19 deletions

View file

@ -11,6 +11,7 @@ import (
"sync"
"time"
"github.com/nspcc-dev/neo-go/pkg/config/netmode"
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
"github.com/nspcc-dev/neo-go/pkg/rpc/request"
"github.com/nspcc-dev/neo-go/pkg/rpc/response"
@ -49,6 +50,7 @@ type Options struct {
CACert string
DialTimeout time.Duration
RequestTimeout time.Duration
Network netmode.Magic
}
// cache stores cache values for the RPC client methods