Merge branch 'master' into feat/nv18-fevm
This commit is contained in:
@@ -780,7 +780,7 @@ func (m *StateModule) StateMarketStorageDeal(ctx context.Context, dealId abi.Dea
|
||||
return stmgr.GetStorageDeal(ctx, m.StateManager, dealId, ts)
|
||||
}
|
||||
|
||||
func (a *StateAPI) StateGetAllocationForPendingDeal(ctx context.Context, dealId abi.DealID, tsk types.TipSetKey) (*verifregtypes.Allocation, error) {
|
||||
func (a *StateAPI) StateGetAllocationForPendingDeal(ctx context.Context, dealId abi.DealID, tsk types.TipSetKey) (*verifreg.Allocation, error) {
|
||||
ts, err := a.Chain.GetTipSetFromKey(ctx, tsk)
|
||||
if err != nil {
|
||||
return nil, xerrors.Errorf("loading tipset %s: %w", tsk, err)
|
||||
@@ -807,7 +807,7 @@ func (a *StateAPI) StateGetAllocationForPendingDeal(ctx context.Context, dealId
|
||||
return a.StateGetAllocation(ctx, dealState.Proposal.Client, allocationId, tsk)
|
||||
}
|
||||
|
||||
func (a *StateAPI) StateGetAllocation(ctx context.Context, clientAddr address.Address, allocationId verifregtypes.AllocationId, tsk types.TipSetKey) (*verifregtypes.Allocation, error) {
|
||||
func (a *StateAPI) StateGetAllocation(ctx context.Context, clientAddr address.Address, allocationId verifreg.AllocationId, tsk types.TipSetKey) (*verifreg.Allocation, error) {
|
||||
idAddr, err := a.StateLookupID(ctx, clientAddr, tsk)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -834,7 +834,7 @@ func (a *StateAPI) StateGetAllocation(ctx context.Context, clientAddr address.Ad
|
||||
return allocation, nil
|
||||
}
|
||||
|
||||
func (a *StateAPI) StateGetAllocations(ctx context.Context, clientAddr address.Address, tsk types.TipSetKey) (map[verifregtypes.AllocationId]verifregtypes.Allocation, error) {
|
||||
func (a *StateAPI) StateGetAllocations(ctx context.Context, clientAddr address.Address, tsk types.TipSetKey) (map[verifreg.AllocationId]verifreg.Allocation, error) {
|
||||
idAddr, err := a.StateLookupID(ctx, clientAddr, tsk)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -858,7 +858,7 @@ func (a *StateAPI) StateGetAllocations(ctx context.Context, clientAddr address.A
|
||||
return allocations, nil
|
||||
}
|
||||
|
||||
func (a *StateAPI) StateGetClaim(ctx context.Context, providerAddr address.Address, claimId verifregtypes.ClaimId, tsk types.TipSetKey) (*verifregtypes.Claim, error) {
|
||||
func (a *StateAPI) StateGetClaim(ctx context.Context, providerAddr address.Address, claimId verifreg.ClaimId, tsk types.TipSetKey) (*verifreg.Claim, error) {
|
||||
idAddr, err := a.StateLookupID(ctx, providerAddr, tsk)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -885,7 +885,7 @@ func (a *StateAPI) StateGetClaim(ctx context.Context, providerAddr address.Addre
|
||||
return claim, nil
|
||||
}
|
||||
|
||||
func (a *StateAPI) StateGetClaims(ctx context.Context, providerAddr address.Address, tsk types.TipSetKey) (map[verifregtypes.ClaimId]verifregtypes.Claim, error) {
|
||||
func (a *StateAPI) StateGetClaims(ctx context.Context, providerAddr address.Address, tsk types.TipSetKey) (map[verifreg.ClaimId]verifreg.Claim, error) {
|
||||
idAddr, err := a.StateLookupID(ctx, providerAddr, tsk)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -7,11 +7,11 @@ import (
|
||||
nilrouting "github.com/ipfs/go-ipfs-routing/none"
|
||||
"github.com/libp2p/go-libp2p"
|
||||
dht "github.com/libp2p/go-libp2p-kad-dht"
|
||||
"github.com/libp2p/go-libp2p-peerstore/pstoremem"
|
||||
record "github.com/libp2p/go-libp2p-record"
|
||||
"github.com/libp2p/go-libp2p/core/host"
|
||||
"github.com/libp2p/go-libp2p/core/peer"
|
||||
"github.com/libp2p/go-libp2p/core/peerstore"
|
||||
"github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoremem"
|
||||
routedhost "github.com/libp2p/go-libp2p/p2p/host/routed"
|
||||
mocknet "github.com/libp2p/go-libp2p/p2p/net/mock"
|
||||
"go.uber.org/fx"
|
||||
|
||||
@@ -46,7 +46,7 @@ func IndexProvider(cfg config.IndexProviderConfig) func(params IdxProv, marketHo
|
||||
engine.WithHost(marketHost),
|
||||
engine.WithRetrievalAddrs(marketHost.Addrs()...),
|
||||
engine.WithEntriesCacheCapacity(cfg.EntriesCacheCapacity),
|
||||
engine.WithEntriesChunkSize(cfg.EntriesChunkSize),
|
||||
engine.WithChainedEntries(cfg.EntriesChunkSize),
|
||||
engine.WithTopicName(topicName),
|
||||
engine.WithPurgeCacheOnStart(cfg.PurgeCacheOnStart),
|
||||
}
|
||||
|
||||
@@ -78,8 +78,9 @@ func Test_IndexProviderTopic(t *testing.T) {
|
||||
func() *pubsub.PubSub { return ps },
|
||||
func() dtypes.MetadataDS { return datastore.NewMapDatastore() },
|
||||
modules.IndexProvider(config.IndexProviderConfig{
|
||||
Enable: true,
|
||||
TopicName: test.givenConfiguredTopic,
|
||||
Enable: true,
|
||||
TopicName: test.givenConfiguredTopic,
|
||||
EntriesChunkSize: 16384,
|
||||
}),
|
||||
),
|
||||
fx.Invoke(func(p provider.Interface) {}),
|
||||
|
||||
+3
-1
@@ -9,6 +9,7 @@ import (
|
||||
_ "net/http/pprof"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/gorilla/mux"
|
||||
@@ -51,7 +52,8 @@ func ServeRPC(h http.Handler, id string, addr multiaddr.Multiaddr) (StopFunc, er
|
||||
|
||||
// Instantiate the server and start listening.
|
||||
srv := &http.Server{
|
||||
Handler: h,
|
||||
Handler: h,
|
||||
ReadHeaderTimeout: 30 * time.Second,
|
||||
BaseContext: func(listener net.Listener) context.Context {
|
||||
ctx, _ := tag.New(context.Background(), tag.Upsert(metrics.APIInterface, id))
|
||||
return ctx
|
||||
|
||||
Reference in New Issue
Block a user