simple fetchers (#1492)
* network: disable shouldNOTRequestAgain * vendor singleflight * network: disable shouldNOTRequestAgain * network, storage: fix tests * network/storage: remove HopCount and SkipCheck * network/stream: use localstore when providing chunks a node has offered * storage: refactor lnetstore * storage: rename FetcherItem to Fetcher * storage/feed: no distinction between catastrophic err or chunk not found * network/stream: remove TestDeliveryFromNodes, as FindPeer is changed, and Swarm connectivity is not a chain * network/stream: fixed intervals tests * swarm: fixes for linter * storage: use LRU cache for fetchers * network, storage: better godoc * storage/netstore: explicit errors * storage/feed/lookup: Clarify ReadFunc expected return error values * storage: address comments by elad
This commit is contained in:
@@ -63,8 +63,8 @@ const (
|
||||
|
||||
// Tests in this file should not request chunks from peers.
|
||||
// This function will panic indicating that there is a problem if request has been made.
|
||||
func dummyRequestFromPeers(_ context.Context, req *network.Request) (*enode.ID, chan struct{}, error) {
|
||||
panic(fmt.Sprintf("unexpected request: address %s, source %s", req.Addr.String(), req.Source.String()))
|
||||
func dummyRequestFromPeers(_ context.Context, req *storage.Request, _ enode.ID) (*enode.ID, error) {
|
||||
panic(fmt.Sprintf("unexpected request: address %s", req.Addr.String()))
|
||||
}
|
||||
|
||||
//This test is a syncing test for nodes.
|
||||
|
Reference in New Issue
Block a user