(n *Nylon)
| 149 | } |
| 150 | |
| 151 | func buildAdvertisements(n *Nylon) []*protocol.Advertisement { |
| 152 | entries := make([]*protocol.Advertisement, 0, len(n.RouterState.Advertised)) |
| 153 | for prefix, adv := range n.RouterState.Advertised { |
| 154 | entries = append(entries, &protocol.Advertisement{ |
| 155 | Prefix: prefix.String(), |
| 156 | NodeId: string(adv.NodeId), |
| 157 | Metric: adv.MetricFn(), |
| 158 | ExpiryUnix: adv.Expiry.Unix(), |
| 159 | PassiveHold: adv.IsPassiveHold, |
| 160 | }) |
| 161 | } |
| 162 | sortAdvertisements(entries) |
| 163 | return entries |
| 164 | } |
| 165 | |
| 166 | func buildSeqnos(n *Nylon) []*protocol.SeqnoEntry { |
| 167 | entries := make([]*protocol.SeqnoEntry, 0, len(n.RouterState.SelfSeqno)) |
no test coverage detected