-
Notifications
You must be signed in to change notification settings - Fork 17
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
Restart Push integration tests and corresponding fixes #78
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ require ( | |
github.com/ipfs/go-blockservice v0.1.3 | ||
github.com/ipfs/go-cid v0.0.7 | ||
github.com/ipfs/go-datastore v0.4.4 | ||
github.com/ipfs/go-graphsync v0.1.2 | ||
github.com/ipfs/go-graphsync v0.1.2-0.20200915122843-4c9b3c863031 | ||
github.com/ipfs/go-ipfs-blockstore v1.0.1 | ||
github.com/ipfs/go-ipfs-blocksutil v0.0.1 | ||
github.com/ipfs/go-ipfs-chunker v0.0.5 | ||
|
@@ -29,5 +29,6 @@ require ( | |
github.com/libp2p/go-libp2p-core v0.5.0 | ||
github.com/stretchr/testify v1.5.1 | ||
github.com/whyrusleeping/cbor-gen v0.0.0-20200810223238-211df3b9e24c | ||
go.uber.org/atomic v1.6.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. did you mean to add this? I don't have an objection. I haven't worked with this library before but I'm sure I can figure it out. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, it's a simple wrapper over "sync/atomic. |
||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -152,6 +152,13 @@ func (m *manager) OnResponseReceived(chid datatransfer.ChannelID, response datat | |
return m.resumeOther(chid) | ||
} | ||
|
||
func (m *manager) OnRequestTimedOut(chid datatransfer.ChannelID) error { | ||
// TODO Start a timer to cleanup state if this dosen't complete in a while | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @hannahhoward Have created issue filecoin-project/lotus#3878 to clean these up from the FSM. |
||
// TODO Should we introduce a new state for this ? | ||
log.Warnf("channel %v has timed out", chid) | ||
return nil | ||
} | ||
|
||
func (m *manager) OnChannelCompleted(chid datatransfer.ChannelID, success bool) error { | ||
if success { | ||
if chid.Initiator != m.peerID { | ||
|
@@ -269,7 +276,7 @@ func (m *manager) acceptRequest( | |
dataReceiver = m.peerID | ||
} | ||
|
||
chid, err := m.channels.CreateNew(incoming.TransferID(), incoming.BaseCid(), stor, voucher, initiator, dataSender, dataReceiver) | ||
chid, err := m.channels.CreateNew(m.peerID, incoming.TransferID(), incoming.BaseCid(), stor, voucher, initiator, dataSender, dataReceiver) | ||
if err != nil { | ||
return result, err | ||
} | ||
|
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 is an interesting change and probably useful.
I dunno if you saw but there's a method called
OtherParty
that takes a peer.ID for the party the data transfer is running on.For symmetry, I'd like to do two things:
I'd like to rename ManagerPeer to ThisParty or SelfParty
and then I'd like to remove the parameter to OtherParty since we now have it in the channel state.
I guess I'd also be fine with SelfPeer and OtherPeer if Party doesn't make sense.
I'm ok with doing this as a seperate cleanup PR btw as well.
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 is done.