Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
magik6k committed May 24, 2022
1 parent df7709c commit b53db68
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmd/lotus-miner/sealing.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"encoding/hex"
"encoding/json"
"fmt"
"github.com/filecoin-project/lotus/lib/httpreader"
"io"
"math"
"net/http"
Expand All @@ -25,6 +24,7 @@ import (
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
"github.com/filecoin-project/lotus/lib/httpreader"

"github.com/filecoin-project/lotus/chain/types"
lcli "github.com/filecoin-project/lotus/cli"
Expand Down
8 changes: 4 additions & 4 deletions lib/rpcenc/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/filecoin-project/lotus/lib/httpreader"
"io"
"io/ioutil"
"net/http"
Expand All @@ -24,6 +23,7 @@ import (
"github.com/filecoin-project/go-state-types/abi"

"github.com/filecoin-project/lotus/extern/storage-sealing/lib/nullreader"
"github.com/filecoin-project/lotus/lib/httpreader"
)

var log = logging.Logger("rpcenc")
Expand All @@ -35,7 +35,7 @@ type StreamType string
const (
Null StreamType = "null"
PushStream StreamType = "push"
HttpUrl StreamType = "http"
HTTP StreamType = "http"
// TODO: Data transfer handoff to workers?
)

Expand Down Expand Up @@ -108,7 +108,7 @@ func ReaderParamEncoder(addr string) jsonrpc.Option {
return reflect.ValueOf(ReaderStream{Type: Null, Info: fmt.Sprint(r.N)}), nil
}
if r, ok := r.(*httpreader.HttpReader); ok && r.URL != "" {
return reflect.ValueOf(ReaderStream{Type: HttpUrl, Info: r.URL}), nil
return reflect.ValueOf(ReaderStream{Type: HTTP, Info: r.URL}), nil
}

reqID := uuid.New()
Expand Down Expand Up @@ -426,7 +426,7 @@ func ReaderParamDecoder() (http.HandlerFunc, jsonrpc.ServerOption) {
}

return reflect.ValueOf(nullreader.NewNullReader(abi.UnpaddedPieceSize(n))), nil
case HttpUrl:
case HTTP:
return reflect.ValueOf(&httpreader.HttpReader{URL: rs.Info}), nil
}

Expand Down

0 comments on commit b53db68

Please sign in to comment.