Merge branch 'master' into asr/spec-v1
This commit is contained in:
@@ -116,7 +116,13 @@ func (a *API) ClientStartDeal(ctx context.Context, params *api.StartDealParams)
|
||||
}
|
||||
}
|
||||
}
|
||||
exist, err := a.WalletHas(ctx, params.Wallet)
|
||||
|
||||
walletKey, err := a.StateAPI.StateManager.ResolveToKeyAddress(ctx, params.Wallet, nil)
|
||||
if err != nil {
|
||||
return nil, xerrors.Errorf("failed resolving params.Wallet addr: %w", params.Wallet)
|
||||
}
|
||||
|
||||
exist, err := a.WalletHas(ctx, walletKey)
|
||||
if err != nil {
|
||||
return nil, xerrors.Errorf("failed getting addr from wallet: %w", params.Wallet)
|
||||
}
|
||||
@@ -199,6 +205,7 @@ func (a *API) ClientListDeals(ctx context.Context) ([]api.DealInfo, error) {
|
||||
Duration: uint64(v.Proposal.Duration()),
|
||||
DealID: v.DealID,
|
||||
CreationTime: v.CreationTime.Time(),
|
||||
Verified: v.Proposal.VerifiedDeal,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -222,6 +229,7 @@ func (a *API) ClientGetDealInfo(ctx context.Context, d cid.Cid) (*api.DealInfo,
|
||||
Duration: uint64(v.Proposal.Duration()),
|
||||
DealID: v.DealID,
|
||||
CreationTime: v.CreationTime.Time(),
|
||||
Verified: v.Proposal.VerifiedDeal,
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -847,6 +855,7 @@ func newDealInfo(v storagemarket.ClientDeal) api.DealInfo {
|
||||
Duration: uint64(v.Proposal.Duration()),
|
||||
DealID: v.DealID,
|
||||
CreationTime: v.CreationTime.Time(),
|
||||
Verified: v.Proposal.VerifiedDeal,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+7
-11
@@ -160,17 +160,13 @@ func (a *MpoolAPI) MpoolPushMessage(ctx context.Context, msg *types.Message, spe
|
||||
return nil, xerrors.Errorf("mpool push: not enough funds: %s < %s", b, msg.Value)
|
||||
}
|
||||
|
||||
smsg, err := a.MessageSigner.SignMessage(ctx, msg)
|
||||
if err != nil {
|
||||
return nil, xerrors.Errorf("mpool push: failed to sign message: %w", err)
|
||||
}
|
||||
|
||||
_, err = a.Mpool.Push(smsg)
|
||||
if err != nil {
|
||||
return nil, xerrors.Errorf("mpool push: failed to push message: %w", err)
|
||||
}
|
||||
|
||||
return smsg, err
|
||||
// Sign and push the message
|
||||
return a.MessageSigner.SignMessage(ctx, msg, func(smsg *types.SignedMessage) error {
|
||||
if _, err := a.Mpool.Push(smsg); err != nil {
|
||||
return xerrors.Errorf("mpool push: failed to push message: %w", err)
|
||||
}
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
||||
func (a *MpoolAPI) MpoolGetNonce(ctx context.Context, addr address.Address) (uint64, error) {
|
||||
|
||||
Reference in New Issue
Block a user