MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / getRemoteBPInfos

Method getRemoteBPInfos

blockproducer/chain.go:1006–1021  ·  view source on GitHub ↗

getRemoteBPInfos remove this node from the peer list.

()

Source from the content-addressed store, hash-verified

1004
1005// getRemoteBPInfos remove this node from the peer list.
1006func (c *Chain) getRemoteBPInfos() (remoteBPInfos []*blockProducerInfo) {
1007 var localBPInfo, bpInfos = func() (*blockProducerInfo, []*blockProducerInfo) {
1008 c.RLock()
1009 defer c.RUnlock()
1010 return c.localBPInfo, c.bpInfos
1011 }()
1012
1013 for _, info := range bpInfos {
1014 if info.nodeID.IsEqual(&localBPInfo.nodeID) {
1015 continue
1016 }
1017 remoteBPInfos = append(remoteBPInfos, info)
1018 }
1019
1020 return remoteBPInfos
1021}
1022
1023func (c *Chain) lastIrreversibleBlock() *blockNode {
1024 c.RLock()

Callers 3

blockingFetchBlockMethod · 0.95

Calls 1

IsEqualMethod · 0.45

Tested by

no test coverage detected