mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 01:13:45 +00:00
swarm/network: HandoverProof should not be nil
This commit is contained in:
parent
40cfae13ef
commit
d075df7159
2 changed files with 16 additions and 11 deletions
|
|
@ -86,7 +86,7 @@ type OfferedHashesMsg struct {
|
||||||
Key []byte // subtype or key
|
Key []byte // subtype or key
|
||||||
From, To uint64 // peer and db-specific entry count
|
From, To uint64 // peer and db-specific entry count
|
||||||
Hashes []byte // stream of hashes (128)
|
Hashes []byte // stream of hashes (128)
|
||||||
*HandoverProof `rlp:"nil"` // HandoverProof
|
*HandoverProof // HandoverProof
|
||||||
}
|
}
|
||||||
|
|
||||||
// String pretty prints OfferedHashesMsg
|
// String pretty prints OfferedHashesMsg
|
||||||
|
|
|
||||||
|
|
@ -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) {
|
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 {
|
func (self *testOutgoingStreamer) GetData([]byte) []byte {
|
||||||
|
|
@ -222,7 +225,9 @@ func TestStreamerUpstreamSubscribeMsgExchange(t *testing.T) {
|
||||||
Code: 1,
|
Code: 1,
|
||||||
Msg: &OfferedHashesMsg{
|
Msg: &OfferedHashesMsg{
|
||||||
Stream: "foo",
|
Stream: "foo",
|
||||||
HandoverProof: nil,
|
HandoverProof: &HandoverProof{
|
||||||
|
Handover: &Handover{},
|
||||||
|
},
|
||||||
Hashes: make([]byte, HashSize),
|
Hashes: make([]byte, HashSize),
|
||||||
From: 6,
|
From: 6,
|
||||||
To: 9,
|
To: 9,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue