Fix relay_scan BuildRecommendations and ScanPorts signatures.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
This commit is contained in:
@@ -92,12 +92,12 @@ func LocalRelayScan(req RelayScanRequest) (*RelayScanReport, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
ports := ScanPorts(host)
|
||||
ports := ScanPorts(host, nil)
|
||||
udp := GuessUDPHints(host, req.UDPGuess)
|
||||
return &RelayScanReport{
|
||||
Host: host, ScannedAt: time.Now().UTC(), LocalReachable: true, ScannedVia: "server",
|
||||
Ports: ports, UDPHints: udp, PathTracerHints: PathTracerHintsFromUDP(udp),
|
||||
Recommendations: BuildRecommendations(ports, nil),
|
||||
Recommendations: BuildRecommendations(ports, nil, nil, host, false),
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ func MergeAgentRelayScan(shell RelayScanReport, agentPayload []byte, udpGuess bo
|
||||
shell.Ports = ports
|
||||
shell.UDPHints = udp
|
||||
shell.PathTracerHints = PathTracerHintsFromUDP(udp)
|
||||
shell.Recommendations = BuildRecommendations(ports, nil)
|
||||
shell.Recommendations = BuildRecommendations(ports, nil, nil, shell.Host, false)
|
||||
shell.ScannedAt = time.Now().UTC()
|
||||
return &shell, nil
|
||||
}
|
||||
@@ -143,7 +143,6 @@ func (r *RelayScanReport) ToScanReport() *ScanReport {
|
||||
}
|
||||
return &ScanReport{
|
||||
Host: r.Host, ScannedAt: r.ScannedAt, Ports: r.Ports, RelayVia: relayVia,
|
||||
UDPHints: r.UDPHints, PathTracerHints: r.PathTracerHints, Message: r.Message,
|
||||
Recommendations: r.Recommendations,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user