Merge remote-tracking branch 'origin/testnet-staging' into feat/cleanup-sectorstate-structs
This commit is contained in:
@@ -2,7 +2,6 @@ package impl
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gbrlsnchs/jwt/v3"
|
||||
"github.com/libp2p/go-libp2p-core/host"
|
||||
"github.com/libp2p/go-libp2p-core/network"
|
||||
|
||||
@@ -148,7 +148,7 @@ func (a *StateAPI) stateForTs(ctx context.Context, ts *types.TipSet) (*state.Sta
|
||||
func (a *StateAPI) StateGetActor(ctx context.Context, actor address.Address, ts *types.TipSet) (*types.Actor, error) {
|
||||
state, err := a.stateForTs(ctx, ts)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, xerrors.Errorf("computing tipset state failed: %w", err)
|
||||
}
|
||||
|
||||
return state.GetActor(actor)
|
||||
|
||||
@@ -3,6 +3,7 @@ package impl
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"github.com/filecoin-project/lotus/api/apistruct"
|
||||
"io"
|
||||
"mime"
|
||||
"net/http"
|
||||
@@ -33,7 +34,7 @@ type StorageMinerAPI struct {
|
||||
}
|
||||
|
||||
func (sm *StorageMinerAPI) ServeRemote(w http.ResponseWriter, r *http.Request) {
|
||||
if !api.HasPerm(r.Context(), api.PermAdmin) {
|
||||
if !apistruct.HasPerm(r.Context(), apistruct.PermAdmin) {
|
||||
w.WriteHeader(401)
|
||||
json.NewEncoder(w).Encode(struct{ Error string }{"unauthorized: missing write permission"})
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user