From 7676e923fef1f4b8d20dd259802f1792e9b627e5 Mon Sep 17 00:00:00 2001 From: Niko Storni Date: Thu, 15 Nov 2018 18:34:01 -0500 Subject: [PATCH] take over any channel --- setup.go | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/setup.go b/setup.go index 77ac6b1..cc601cf 100644 --- a/setup.go +++ b/setup.go @@ -1,7 +1,6 @@ package main import ( - "strings" "time" "github.com/lbryio/lbry.go/errors" @@ -201,23 +200,8 @@ func (s *Sync) ensureChannelOwnership() error { return nil } - resolveResp, err := s.daemon.Resolve(s.LbryChannelName) - if err != nil { - return err - } - - channel := (*resolveResp)[s.LbryChannelName] channelBidAmount := channelClaimAmount - channelNotFound := channel.Error != nil && strings.Contains(*(channel.Error), "cannot be resolved") - if !channelNotFound { - if !s.TakeOverExistingChannel { - return errors.Err("Channel exists and we don't own it. Pick another channel.") - } - log.Println("Channel exists and we don't own it. Outbidding existing claim.") - channelBidAmount, _ = channel.Certificate.Amount.Add(decimal.NewFromFloat(channelClaimAmount)).Float64() - } - balanceResp, err := s.daemon.WalletBalance() if err != nil { return err