]> Sergey Matveev's repositories - btrtrc.git/blobdiff - torrent.go
Reduce some logging
[btrtrc.git] / torrent.go
index 2e6fb6ef9e1115ca2b55082677cca1520477d23e..fbb5f6b005256dbbee547b9d987117ee6cebd8a1 100644 (file)
@@ -2381,3 +2381,12 @@ func (t *Torrent) deleteConnWithAllPieces(p *Peer) bool {
 func (t *Torrent) numActivePeers() int {
        return len(t.conns) + len(t.webSeeds)
 }
+
+func (t *Torrent) hasStorageCap() bool {
+       f := t.storage.Capacity
+       if f == nil {
+               return false
+       }
+       _, ok := (*f)()
+       return ok
+}