diff --git a/pkg/chain/message_store.go b/pkg/chain/message_store.go index 6eae86b4e5..a27d7bfd7f 100644 --- a/pkg/chain/message_store.go +++ b/pkg/chain/message_store.go @@ -329,8 +329,7 @@ func (ms *MessageStore) LoadReceipts(ctx context.Context, c cid.Cid) ([]types.Me // StoreReceipts puts the input signed messages to a collection and then writes // this collection to ipld storage. The cid of the collection is returned. func (ms *MessageStore) StoreReceipts(ctx context.Context, receipts []types.MessageReceipt) (cid.Cid, error) { - tmp := blockstoreutil.NewTemporary() - rectarr := adt.MakeEmptyArray(adt.WrapStore(ctx, cbor.NewCborStore(tmp))) + rectarr := adt.MakeEmptyArray(adt.WrapStore(ctx, cbor.NewCborStore(ms.bs))) for i, receipt := range receipts { if err := rectarr.Set(uint64(i), &receipt); err != nil { @@ -338,16 +337,6 @@ func (ms *MessageStore) StoreReceipts(ctx context.Context, receipts []types.Mess } } - root, err := rectarr.Root() - if err != nil { - return cid.Undef, err - } - - err = blockstoreutil.CopyParticial(ctx, tmp, ms.bs, root) - if err != nil { - return cid.Undef, err - } - return rectarr.Root() }