Skip to content

Commit

Permalink
Merge pull request #472 from ipfs-force-community/fix/deal-uuid
Browse files Browse the repository at this point in the history
fix: use the received deal uuid
  • Loading branch information
LinZexiao authored Oct 20, 2023
2 parents d3874c1 + a697437 commit 9a8cf5d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions cli/storage-deals.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ var dealsImportDataCmd = &cli.Command{
Usage: "Actually send transaction performing the action",
},
},
ArgsUsage: "<proposal CID> <file>",
ArgsUsage: "<proposal CID or uuid> <file>",
Action: func(cctx *cli.Context) error {
api, closer, err := NewMarketNode(cctx)
if err != nil {
Expand Down Expand Up @@ -117,14 +117,18 @@ var dealsBatchImportDataCmd = &cli.Command{
Flags: []cli.Flag{
&cli.StringSliceFlag{
Name: "proposals",
Usage: "proposal cid and car file, eg. --proposals <proposal_cid>,<path_to_car_file> --proposals <proposal_cid>,<path_to_car_file>",
Usage: "proposal cid(or uuid) and car file, eg. --proposals <proposal_cid>,<path_to_car_file> --proposals <uuid>,<path_to_car_file>",
},
&cli.StringFlag{
Name: "manifest",
Usage: `A file containing proposal cid and piece cid, eg.
proposalCID,pieceCID
baadfdxxx,badddxxx
basdefxxx,baefaxxx
or
uuid,pieceCID
baad-xxx,badddxxx
bass-xxx,baefaxxx
`,
},
&cli.BoolFlag{
Expand Down
2 changes: 1 addition & 1 deletion storageprovider/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ func (storageDealStream *StorageDealStream) HandleNewDealStream(s network2.Strea
}

deal := &types.MinerDeal{
ID: uuid.New(),
ID: proposal.DealUUID,
Client: s.Conn().RemotePeer(),
Miner: storageDealStream.net.ID(),
ClientDealProposal: proposal.ClientDealProposal,
Expand Down

0 comments on commit 9a8cf5d

Please sign in to comment.