These are chat archives for anacrolix/torrent

Jun 2018
Jun 15 2018 02:00 UTC
@anacrolix Essentially all this and more
    fullStruct := singleTorrent.Stats()
    activePeersString := strconv.Itoa(fullStruct.ActivePeers) //converting to strings
    totalPeersString := fmt.Sprintf("%v", fullStruct.TotalPeers)
    fullClientDB.StoragePath = singleTorrentFromStorage.StoragePath

    downloadedSizeHumanized := HumanizeBytes(float32(calculatedCompletedSize)) //convert size to GB if needed
    totalSizeHumanized := HumanizeBytes(float32(calculatedTotalSize))

    fullClientDB.DownloadedSize = downloadedSizeHumanized
    fullClientDB.Size = totalSizeHumanized
    PercentDone := fmt.Sprintf("%.2f", float32(calculatedCompletedSize)/float32(calculatedTotalSize))
    fullClientDB.TorrentHash = TempHash
    fullClientDB.PercentDone = PercentDone
    fullClientDB.DataBytesRead = fullStruct.ConnStats.BytesReadData       //used for calculations not passed to client calculating up/down speed
    fullClientDB.DataBytesWritten = fullStruct.ConnStats.BytesWrittenData //used for calculations not passed to client calculating up/down speed
    fullClientDB.ActivePeers = activePeersString + " / (" + totalPeersString + ")"
    fullClientDB.TorrentHashString = TempHash.String()
    fullClientDB.TorrentName = singleTorrentFromStorage.TorrentName
    fullClientDB.DateAdded = singleTorrentFromStorage.DateAdded
    fullClientDB.TorrentLabel = singleTorrentFromStorage.Label
    fullClientDB.BytesCompleted = calculatedCompletedSize
    fullClientDB.NumberofFiles = len(singleTorrent.Files())
Matt Joiner
Jun 15 2018 03:53 UTC
Yeah I can't see how anyo those would trigger the assertion :(
@elgatito I suspect having proxyURL set will cause utp dials to fail
Jun 15 2018 03:54 UTC
Matt Joiner
Jun 15 2018 03:54 UTC
calling the proxy.Dialer.Dial with "udp" network won't have the desired effect
it could be done but it's probably a bit of work to wire it into the go-libutp package
Jun 15 2018 03:57 UTC
Then we can disable udp if proxyurl is set
Matt Joiner
Jun 15 2018 03:58 UTC
for now that's best, assuming i'm right. it'll just error atm if i'm right, and you should see no successful utp dials in the debug vars
 TotalPeers: (int) 514,
 PendingPeers: (int) 493,
 ActivePeers: (int) 2,
 ConnectedSeeders: (int) 2,
 HalfOpenPeers: (int) 25