mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-29 14:48:28 +00:00
0b8cbd06b6
* refactor a bit to select p2p * lint * fix build * fix build * fix build * fix build * fix build
24 lines
556 B
Go
24 lines
556 B
Go
package p2p
|
|
|
|
import (
|
|
"sync"
|
|
|
|
"github.com/libp2p/go-libp2p-core/peer"
|
|
pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
|
|
)
|
|
|
|
var handshakes = make(map[peer.ID]*pb.Hello)
|
|
var handshakeLock sync.Mutex
|
|
|
|
// AddHandshake to the local records for initial sync.
|
|
func (p *Service) AddHandshake(pid peer.ID, hello *pb.Hello) {
|
|
handshakeLock.Lock()
|
|
defer handshakeLock.Unlock()
|
|
handshakes[pid] = hello
|
|
}
|
|
|
|
// Handshakes has not been implemented yet and it may be moved to regular sync...
|
|
func (p *Service) Handshakes() map[peer.ID]*pb.Hello {
|
|
return nil
|
|
}
|