diff --git a/internal/native/native.go b/internal/native/native.go index bb92ed8..b15173b 100644 --- a/internal/native/native.go +++ b/internal/native/native.go @@ -118,11 +118,16 @@ func (n *Native) Connect(endpoint, hexPrivateKey string, dialTimeout, streamTime tok.SetAuthKey(&key) tok.SetExp(exp) + res, err := cli.NetworkInfo(n.vu.Context(), client.PrmNetworkInfo{}) + if err != nil { + return nil, err + } + + prevEpoch := res.Info().CurrentEpoch() - 1 + tok.SetNbf(prevEpoch) + tok.SetIat(prevEpoch) + if prepareLocally && maxObjSize > 0 { - res, err := cli.NetworkInfo(n.vu.Context(), client.PrmNetworkInfo{}) - if err != nil { - return nil, err - } if uint64(maxObjSize) > res.Info().MaxObjectSize() { return nil, fmt.Errorf("max object size must be not greater than %d bytes", res.Info().MaxObjectSize()) }