Compare commits

...
2 Commits
Author SHA1 Message Date
Niko Storni 8c349cf7ac fix bug in queues 2019-06-24 04:14:27 -04:00
Niko Storni f3f40c41ef fix refill balance 2019-06-22 06:08:11 -04:00
2 changed files with 4 additions and 4 deletions

No files matched your search

+1 -1
View File
@@ -177,7 +177,7 @@ func (s *SyncManager) Start() error {
namer: namer.NewNamer(),
Fee: c.Fee,
})
break
continue
}
}
}
+3 -3
View File
@@ -90,12 +90,12 @@ func (s *Sync) walletSetup() error {
}
s.syncedVideosMux.RUnlock()
log.Debugf("We already allocated credits for %d videos", publishedCount)
log.Debugf("We already allocated credits for %d published videos and %d failed videos", publishedCount, failedCount)
if videosOnYoutube > s.Manager.videosLimit {
videosOnYoutube = s.Manager.videosLimit
}
unallocatedVideos := videosOnYoutube - publishedCount
unallocatedVideos := videosOnYoutube - (publishedCount + failedCount)
requiredBalance := float64(unallocatedVideos)*(publishAmount+estimatedMaxTxFee) + channelClaimAmount
if s.Manager.upgradeMetadata {
requiredBalance += float64(notUpgradedCount) * 0.001
@@ -103,7 +103,7 @@ func (s *Sync) walletSetup() error {
refillAmount := 0.0
if balance < requiredBalance || balance < minimumAccountBalance {
refillAmount = math.Max(requiredBalance-requiredBalance, minimumRefillAmount)
refillAmount = math.Max(requiredBalance-balance, minimumRefillAmount)
}
if s.Refill > 0 {