gofmt
This commit is contained in:
parent
1ecec49885
commit
42bb91c2e6
@ -75,7 +75,7 @@ func NewWorkerRPC(addr string, requestHeader http.Header) (api.WorkerAPI, jsonrp
|
||||
requestHeader,
|
||||
rpcenc.ReaderParamEncoder(u.String()),
|
||||
jsonrpc.WithNoReconnect(),
|
||||
jsonrpc.WithWriteTimeout(30 * time.Second),
|
||||
jsonrpc.WithWriteTimeout(30*time.Second),
|
||||
)
|
||||
|
||||
return &res, closer, err
|
||||
|
@ -27,6 +27,7 @@ var log = logging.Logger("rpcenc")
|
||||
var Timeout = 30 * time.Second
|
||||
|
||||
type StreamType string
|
||||
|
||||
const (
|
||||
Null StreamType = "null"
|
||||
PushStream StreamType = "push"
|
||||
|
@ -48,7 +48,7 @@ func TestReaderProxy(t *testing.T) {
|
||||
testServ := httptest.NewServer(mux)
|
||||
defer testServ.Close()
|
||||
|
||||
re := ReaderParamEncoder("http://"+testServ.Listener.Addr().String()+"/rpc/streams/v0/push")
|
||||
re := ReaderParamEncoder("http://" + testServ.Listener.Addr().String() + "/rpc/streams/v0/push")
|
||||
closer, err := jsonrpc.NewMergeClient("ws://"+testServ.Listener.Addr().String()+"/rpc/v0", "ReaderHandler", []interface{}{&client}, nil, re)
|
||||
require.NoError(t, err)
|
||||
|
||||
@ -61,7 +61,7 @@ func TestReaderProxy(t *testing.T) {
|
||||
|
||||
func TestNullReaderProxy(t *testing.T) {
|
||||
var client struct {
|
||||
ReadAll func(ctx context.Context, r io.Reader) ([]byte, error)
|
||||
ReadAll func(ctx context.Context, r io.Reader) ([]byte, error)
|
||||
ReadNullLen func(ctx context.Context, r io.Reader) (int64, error)
|
||||
}
|
||||
|
||||
@ -78,7 +78,7 @@ func TestNullReaderProxy(t *testing.T) {
|
||||
testServ := httptest.NewServer(mux)
|
||||
defer testServ.Close()
|
||||
|
||||
re := ReaderParamEncoder("http://"+testServ.Listener.Addr().String()+"/rpc/streams/v0/push")
|
||||
re := ReaderParamEncoder("http://" + testServ.Listener.Addr().String() + "/rpc/streams/v0/push")
|
||||
closer, err := jsonrpc.NewMergeClient("ws://"+testServ.Listener.Addr().String()+"/rpc/v0", "ReaderHandler", []interface{}{&client}, nil, re)
|
||||
require.NoError(t, err)
|
||||
|
||||
|
@ -323,9 +323,9 @@ func (s *WindowPoStScheduler) runPost(ctx context.Context, di miner.DeadlineInfo
|
||||
}
|
||||
|
||||
params := &miner.SubmitWindowedPoStParams{
|
||||
Deadline: di.Index,
|
||||
Partitions: make([]miner.PoStPartition, 0, len(partitions)),
|
||||
Proofs: nil,
|
||||
Deadline: di.Index,
|
||||
Partitions: make([]miner.PoStPartition, 0, len(partitions)),
|
||||
Proofs: nil,
|
||||
}
|
||||
|
||||
var sinfos []abi.SectorInfo
|
||||
|
Loading…
Reference in New Issue
Block a user