mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 09:23:48 +00:00
Rename priorityqueues to priorityqueue
This commit is contained in:
parent
ca2882fc81
commit
974536d1cf
2 changed files with 4 additions and 4 deletions
|
|
@ -24,7 +24,7 @@ import (
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
"github.com/ethereum/go-ethereum/p2p/protocols"
|
"github.com/ethereum/go-ethereum/p2p/protocols"
|
||||||
bv "github.com/ethereum/go-ethereum/swarm/network/bitvector"
|
bv "github.com/ethereum/go-ethereum/swarm/network/bitvector"
|
||||||
pq "github.com/ethereum/go-ethereum/swarm/network/priorityqueues"
|
pq "github.com/ethereum/go-ethereum/swarm/network/priorityqueue"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
@ -34,7 +34,7 @@ const (
|
||||||
Mid
|
Mid
|
||||||
High
|
High
|
||||||
Top
|
Top
|
||||||
PriorityQueues // number of queues
|
PriorityQueue // number of queues
|
||||||
PriorityQueueCap = 3 // queue capacity
|
PriorityQueueCap = 3 // queue capacity
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -177,7 +177,7 @@ type IncomingStreamer interface {
|
||||||
type StreamerPeer struct {
|
type StreamerPeer struct {
|
||||||
Peer
|
Peer
|
||||||
streamer *Streamer
|
streamer *Streamer
|
||||||
pq *pq.PriorityQueues
|
pq *pq.PriorityQueue
|
||||||
outgoingLock sync.RWMutex
|
outgoingLock sync.RWMutex
|
||||||
incomingLock sync.RWMutex
|
incomingLock sync.RWMutex
|
||||||
outgoing map[Stream]OutgoingStreamer
|
outgoing map[Stream]OutgoingStreamer
|
||||||
|
|
@ -188,7 +188,7 @@ type StreamerPeer struct {
|
||||||
// NewStreamerPeer is the constructor for StreamerPeer
|
// NewStreamerPeer is the constructor for StreamerPeer
|
||||||
func NewStreamerPeer(p Peer, streamer *Streamer) *StreamerPeer {
|
func NewStreamerPeer(p Peer, streamer *Streamer) *StreamerPeer {
|
||||||
self := &StreamerPeer{
|
self := &StreamerPeer{
|
||||||
pq: pq.New(PriorityQueues, PriorityQueueCap),
|
pq: pq.New(PriorityQueue, PriorityQueueCap),
|
||||||
streamer: streamer,
|
streamer: streamer,
|
||||||
outgoing: make(map[Stream]OutgoingStreamer),
|
outgoing: make(map[Stream]OutgoingStreamer),
|
||||||
incoming: make(map[Stream]IncomingStreamer),
|
incoming: make(map[Stream]IncomingStreamer),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue