@@ -275,6 +275,10 @@ func migrateBoostDeals(ctx context.Context, activeSectors bitfield.BitField, mad
275
275
276
276
// Cbor marshal the Deal Label manually as non-string label will result in "" with JSON marshal
277
277
label := prop .Label
278
+ propCid , err := prop .Cid ()
279
+ if err != nil {
280
+ return fmt .Errorf ("deal: %s: failed to calculate prop.Cid: %s" , deal .DealUuid .String (), err )
281
+ }
278
282
buf := new (bytes.Buffer )
279
283
err = label .MarshalCBOR (buf )
280
284
if err != nil {
@@ -286,12 +290,12 @@ func migrateBoostDeals(ctx context.Context, activeSectors bitfield.BitField, mad
286
290
// Add deal to HarmonyDB
287
291
if ! a {
288
292
_ , err = tx .Exec (`INSERT INTO market_mk12_deals (uuid, sp_id, signed_proposal_cid,
289
- proposal_signature, proposal, piece_cid,
293
+ proposal_signature, proposal, proposal_cid, piece_cid,
290
294
piece_size, offline, verified, start_epoch, end_epoch,
291
295
client_peer_id, fast_retrieval, announce_to_ipni, url, url_headers, chain_deal_id, publish_cid, created_at, label)
292
- VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20)
296
+ VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21 )
293
297
ON CONFLICT (uuid) DO NOTHING` ,
294
- deal .DealUuid .String (), mid , sProp .String (), sigByte , propJson , prop .PieceCID .String (),
298
+ deal .DealUuid .String (), mid , sProp .String (), sigByte , propJson , propCid , prop .PieceCID .String (),
295
299
prop .PieceSize , deal .IsOffline , prop .VerifiedDeal , prop .StartEpoch , prop .EndEpoch , deal .ClientPeerID .String (),
296
300
deal .FastRetrieval , deal .AnnounceToIPNI , tInfo .URL , headers , int64 (deal .ChainDealID ), deal .PublishCID .String (), deal .CreatedAt , buf .Bytes ())
297
301
0 commit comments