diff --git a/swarm/network/streamer.go b/swarm/network/streamer.go index 2d50a31390..61351bf392 100644 --- a/swarm/network/streamer.go +++ b/swarm/network/streamer.go @@ -82,11 +82,11 @@ type SubscribeMsg struct { // OfferedHashesMsg is the protocol msg for offering to hand over a // stream section type OfferedHashesMsg struct { - Stream string // name of Stream - Key []byte // subtype or key - From, To uint64 // peer and db-specific entry count - Hashes []byte // stream of hashes (128) - *HandoverProof `rlp:"nil"` // HandoverProof + Stream string // name of Stream + Key []byte // subtype or key + From, To uint64 // peer and db-specific entry count + Hashes []byte // stream of hashes (128) + *HandoverProof // HandoverProof } // String pretty prints OfferedHashesMsg diff --git a/swarm/network/streamer_test.go b/swarm/network/streamer_test.go index df1f92e3b5..5f2c5369ff 100644 --- a/swarm/network/streamer_test.go +++ b/swarm/network/streamer_test.go @@ -136,7 +136,10 @@ func (self *testIncomingStreamer) BatchDone(string, uint64, []byte, []byte) func } func (self *testOutgoingStreamer) SetNextBatch(from uint64, to uint64) ([]byte, uint64, uint64, *HandoverProof, error) { - return make([]byte, HashSize), from + 1, to + 1, nil, nil + proof := &HandoverProof{ + Handover: &Handover{}, + } + return make([]byte, HashSize), from + 1, to + 1, proof, nil } func (self *testOutgoingStreamer) GetData([]byte) []byte { @@ -221,11 +224,13 @@ func TestStreamerUpstreamSubscribeMsgExchange(t *testing.T) { p2ptest.Expect{ Code: 1, Msg: &OfferedHashesMsg{ - Stream: "foo", - HandoverProof: nil, - Hashes: make([]byte, HashSize), - From: 6, - To: 9, + Stream: "foo", + HandoverProof: &HandoverProof{ + Handover: &Handover{}, + }, + Hashes: make([]byte, HashSize), + From: 6, + To: 9, }, Peer: peerID, },