Merge pull request #1029 from filecoin-project/feat/mpoolpush-cid

mpool: Return CID in MpoolPush
This commit is contained in:
Łukasz Magiera
2020-01-08 13:43:03 +01:00
committed by GitHub
8 changed files with 13 additions and 19 deletions
+1 -1
View File
@@ -78,7 +78,7 @@ func (a *MpoolAPI) MpoolPending(ctx context.Context, ts *types.TipSet) ([]*types
}
}
func (a *MpoolAPI) MpoolPush(ctx context.Context, smsg *types.SignedMessage) error {
func (a *MpoolAPI) MpoolPush(ctx context.Context, smsg *types.SignedMessage) (cid.Cid, error) {
return a.Mpool.Push(smsg)
}
+2 -2
View File
@@ -129,7 +129,7 @@ func (a *PaychAPI) PaychClose(ctx context.Context, addr address.Address) (cid.Ci
return cid.Undef, err
}
if err := a.MpoolPush(ctx, smsg); err != nil {
if _, err := a.MpoolPush(ctx, smsg); err != nil {
return cid.Undef, err
}
@@ -244,7 +244,7 @@ func (a *PaychAPI) PaychVoucherSubmit(ctx context.Context, ch address.Address, s
return cid.Undef, err
}
if err := a.MpoolPush(ctx, smsg); err != nil {
if _, err := a.MpoolPush(ctx, smsg); err != nil {
return cid.Undef, err
}