-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Miner Data Transfer Restart Cmd #4387
Conversation
@@ -102,6 +104,9 @@ type StorageMiner interface { | |||
PiecesGetPieceInfo(ctx context.Context, pieceCid cid.Cid) (*piecestore.PieceInfo, error) | |||
PiecesGetCIDInfo(ctx context.Context, payloadCid cid.Cid) (*piecestore.CIDInfo, error) | |||
|
|||
// MinerRestartDataTransfer attempts to restart a data transfer with the given transfer ID and other peer | |||
MinerRestartDataTransfer(ctx context.Context, transferID datatransfer.TransferID, otherPeer peer.ID, isInitiator bool) error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably be prefixed with Markets
and be next to MarketDataTransferUpdates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Naming change suggested by @magik6k
- Command should just be "restart"
- Initiator should default to false on miner side
I also noticed there's a change to test-vectors in this PR -- is that intentional? If not, remove
} | ||
|
||
var minerRestartTransfer = &cli.Command{ | ||
Name: "restart-transfer", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can just be "restart" rather than "restart-transfer" cause the miner command will already be under the "data-transfers" namespace
&cli.BoolFlag{ | ||
Name: "initiator", | ||
Usage: "specify only transfers where peer is/is not initiator", | ||
Value: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initiator on this side should default to false 99% of the time the miner is NOT the initiator of the request (even when sending data)
@magik6k @hannahhoward Have made the changes. The test failure looks like a flaky. |
Done in #4572 |
Closes #4380.
@hannahhoward Where should I add the documentation for this command ?