swarm/*: remove redundant type specifiers (#19089)

pull/19163/head
Matthew Halpern 6 years ago committed by Viktor Trón
parent 4e87b444ca
commit 81babe1509
  1. 2
      swarm/network/stream/stream.go
  2. 2
      swarm/pss/pss.go
  3. 2
      swarm/storage/feed/lookup/lookup_test.go
  4. 2
      swarm/storage/ldbstore_test.go

@ -75,7 +75,7 @@ const (
// subscriptionFunc is used to determine what to do in order to perform subscriptions // subscriptionFunc is used to determine what to do in order to perform subscriptions
// usually we would start to really subscribe to nodes, but for tests other functionality may be needed // usually we would start to really subscribe to nodes, but for tests other functionality may be needed
// (see TestRequestPeerSubscriptions in streamer_test.go) // (see TestRequestPeerSubscriptions in streamer_test.go)
var subscriptionFunc func(r *Registry, p *network.Peer, bin uint8, subs map[enode.ID]map[Stream]struct{}) bool = doRequestSubscription var subscriptionFunc = doRequestSubscription
// Registry registry for outgoing and incoming streamer constructors // Registry registry for outgoing and incoming streamer constructors
type Registry struct { type Registry struct {

@ -676,7 +676,7 @@ func (p *Pss) send(to []byte, topic Topic, msg []byte, asymmetric bool, key []by
// sendFunc is a helper function that tries to send a message and returns true on success. // sendFunc is a helper function that tries to send a message and returns true on success.
// It is set here for usage in production, and optionally overridden in tests. // It is set here for usage in production, and optionally overridden in tests.
var sendFunc func(p *Pss, sp *network.Peer, msg *PssMsg) bool = sendMsg var sendFunc = sendMsg
// tries to send a message, returns true if successful // tries to send a message, returns true if successful
func sendMsg(p *Pss, sp *network.Peer, msg *PssMsg) bool { func sendMsg(p *Pss, sp *network.Peer, msg *PssMsg) bool {

File diff suppressed because one or more lines are too long

@ -189,9 +189,9 @@ func TestMockDbStoreNotFound(t *testing.T) {
} }
func testIterator(t *testing.T, mock bool) { func testIterator(t *testing.T, mock bool) {
var chunkcount int = 32
var i int var i int
var poc uint var poc uint
chunkcount := 32
chunkkeys := NewAddressCollection(chunkcount) chunkkeys := NewAddressCollection(chunkcount)
chunkkeysResults := NewAddressCollection(chunkcount) chunkkeysResults := NewAddressCollection(chunkcount)

Loading…
Cancel
Save