getRemoteBPInfos remove this node from the peer list.
()
| 1004 | |
| 1005 | // getRemoteBPInfos remove this node from the peer list. |
| 1006 | func (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 | |
| 1023 | func (c *Chain) lastIrreversibleBlock() *blockNode { |
| 1024 | c.RLock() |
no test coverage detected