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

This commit is contained in:
Matthew Halpern 2019-02-24 23:58:18 -08:00 committed by Viktor Trón
parent 4e87b444ca
commit 81babe1509
4 changed files with 4 additions and 4 deletions

@ -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)