mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 20:56:42 +00:00
leave out timeout from rlp temp
This commit is contained in:
parent
08f5f59f89
commit
d25993f0b5
2 changed files with 9 additions and 9 deletions
|
|
@ -242,7 +242,7 @@ func (self *NetStore) deliver(req *retrieveRequestMsgData, chunk *Chunk) {
|
||||||
Id: req.Id,
|
Id: req.Id,
|
||||||
Data: chunk.Data,
|
Data: chunk.Data,
|
||||||
Size: uint64(chunk.Size),
|
Size: uint64(chunk.Size),
|
||||||
RequestTimeout: req.timeout, //
|
requestTimeout: req.timeout, //
|
||||||
// StorageTimeout time.Time // expiry of content
|
// StorageTimeout time.Time // expiry of content
|
||||||
// Metadata metaData
|
// Metadata metaData
|
||||||
}
|
}
|
||||||
|
|
@ -267,7 +267,7 @@ func (self *NetStore) peers(req *retrieveRequestMsgData, chunk *Chunk, timeout t
|
||||||
Peers: []*peerAddr{}, // get proximity bin from cademlia routing table
|
Peers: []*peerAddr{}, // get proximity bin from cademlia routing table
|
||||||
Key: req.Key,
|
Key: req.Key,
|
||||||
Id: req.Id,
|
Id: req.Id,
|
||||||
Timeout: timeout,
|
timeout: timeout,
|
||||||
}
|
}
|
||||||
req.peer.peers(peersData)
|
req.peer.peers(peersData)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ Retrieving
|
||||||
|
|
||||||
Peers
|
Peers
|
||||||
|
|
||||||
[0x04, key: B_256, timeout: B_64, peers: [[peer], [peer], .... ]] the encoding of a peer is identical to that in the devp2p base protocol peers messages: [IP, Port, NodeID] note that a node's DPA address is not the NodeID but the hash of the NodeID. Timeout serves to indicate whether the responder is forwarding the query within the timeout or not.
|
[0x04, key: B_256, timeout: B_64, peers: [[peer], [peer], .... ]] the encoding of a peer is identical to that in the devp2p base protocol peers messages: [IP, Port, NodeID] note that a node's DPA address is not the NodeID but the hash of the NodeID. timeout serves to indicate whether the responder is forwarding the query within the timeout or not.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -78,8 +78,8 @@ type storeRequestMsgData struct {
|
||||||
Data []byte // is this needed?
|
Data []byte // is this needed?
|
||||||
// optional
|
// optional
|
||||||
Id uint64 //
|
Id uint64 //
|
||||||
RequestTimeout time.Time // expiry for forwarding
|
requestTimeout time.Time // expiry for forwarding
|
||||||
StorageTimeout time.Time // expiry of content
|
storageTimeout time.Time // expiry of content
|
||||||
Metadata metaData //
|
Metadata metaData //
|
||||||
//
|
//
|
||||||
peer peer
|
peer peer
|
||||||
|
|
@ -87,7 +87,7 @@ type storeRequestMsgData struct {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Root key retrieve request
|
Root key retrieve request
|
||||||
Timeout in milliseconds. Note that zero timeout retrieval requests do not request forwarding, but prompt for a peers message response. therefore they also serve also as messages to retrieve peers.
|
timeout in milliseconds. Note that zero timeout retrieval requests do not request forwarding, but prompt for a peers message response. therefore they also serve also as messages to retrieve peers.
|
||||||
MaxSize specifies the maximum size that the peer will accept. This is useful in particular if we allow storage and delivery of multichunk payload representing the entire or partial subtree unfolding from the requested root key. So when only interested in limited part of a stream (infinite trees) or only testing chunk availability etc etc, we can indicate it by limiting the size here.
|
MaxSize specifies the maximum size that the peer will accept. This is useful in particular if we allow storage and delivery of multichunk payload representing the entire or partial subtree unfolding from the requested root key. So when only interested in limited part of a stream (infinite trees) or only testing chunk availability etc etc, we can indicate it by limiting the size here.
|
||||||
In the special case that the key is identical to the peers own address (hash of NodeID) the message is to be handled as a self lookup. The response is a PeersMsg with the peers in the cademlia proximity bin corresponding to the address.
|
In the special case that the key is identical to the peers own address (hash of NodeID) the message is to be handled as a self lookup. The response is a PeersMsg with the peers in the cademlia proximity bin corresponding to the address.
|
||||||
It is unclear if a retrieval request with an empty target is the same as a self lookup
|
It is unclear if a retrieval request with an empty target is the same as a self lookup
|
||||||
|
|
@ -113,13 +113,13 @@ type peerAddr struct {
|
||||||
one response to retrieval, always encouraged after a retrieval request to respond with a list of peers in the same cademlia proximity bin.
|
one response to retrieval, always encouraged after a retrieval request to respond with a list of peers in the same cademlia proximity bin.
|
||||||
The encoding of a peer is identical to that in the devp2p base protocol peers messages: [IP, Port, NodeID]
|
The encoding of a peer is identical to that in the devp2p base protocol peers messages: [IP, Port, NodeID]
|
||||||
note that a node's DPA address is not the NodeID but the hash of the NodeID.
|
note that a node's DPA address is not the NodeID but the hash of the NodeID.
|
||||||
Timeout serves to indicate whether the responder is forwarding the query within the timeout or not.
|
timeout serves to indicate whether the responder is forwarding the query within the timeout or not.
|
||||||
The Key is the target (if response to a retrieval request) or peers address (hash of NodeID) if retrieval request was a self lookup.
|
The Key is the target (if response to a retrieval request) or peers address (hash of NodeID) if retrieval request was a self lookup.
|
||||||
It is unclear if PeersMsg with an empty Key has a special meaning or just mean the same as with the peers address as Key (cademlia bin)
|
It is unclear if PeersMsg with an empty Key has a special meaning or just mean the same as with the peers address as Key (cademlia bin)
|
||||||
*/
|
*/
|
||||||
type peersMsgData struct {
|
type peersMsgData struct {
|
||||||
Peers []*peerAddr //
|
Peers []*peerAddr //
|
||||||
Timeout time.Time // indicate whether responder is expected to deliver content
|
timeout time.Time // indicate whether responder is expected to deliver content
|
||||||
Key Key // if a response to a retrieval request
|
Key Key // if a response to a retrieval request
|
||||||
Id uint64 // if a response to a retrieval request
|
Id uint64 // if a response to a retrieval request
|
||||||
//
|
//
|
||||||
|
|
@ -210,7 +210,7 @@ func (self *bzzProtocol) handle() error {
|
||||||
}
|
}
|
||||||
dpaLogger.Warnf("Request message: %#v", req)
|
dpaLogger.Warnf("Request message: %#v", req)
|
||||||
if req.Key == nil {
|
if req.Key == nil {
|
||||||
return self.protoError(ErrDecode, "protocol handler: req.Key == nil || req.Timeout == nil")
|
return self.protoError(ErrDecode, "protocol handler: req.Key == nil || req.timeout == nil")
|
||||||
}
|
}
|
||||||
req.peer = peer{bzzProtocol: self}
|
req.peer = peer{bzzProtocol: self}
|
||||||
self.netStore.addRetrieveRequest(&req)
|
self.netStore.addRetrieveRequest(&req)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue