Skip to content

Commit

Permalink
Removed daemon side bid checks during publish
Browse files Browse the repository at this point in the history
Fixes #748

Fixed failing test, Yay!

Why CHANGELOG? Why not anarchy?
  • Loading branch information
hackrush01 committed Feb 14, 2018
1 parent 1a330fc commit 41543a9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Expand Up @@ -25,6 +25,17 @@ at anytime.
* `blob_list` failing with --uri parameter (https://github.com/lbryio/lbry/issues/895)
* `get` failing with a non-useful error message when given a uri for a channel claim
* exception checking in several wallet unit tests
* Fixed unnecessarily verbose exchange rate error (https://github.com/lbryio/lbry/issues/984)
* Merged two separate dht test folders into one
* Fixed value error due to a race condition when saving to the claim cache (https://github.com/lbryio/lbry/issues/1013)
* Fixed being unable to re-download updated content (#951)
* Fixed sending error messages for failed api requests
* Fixed the file manager startup being slow when handling thousands of files
* Fixed handling decryption error for blobs encrypted with an invalid key
* Fixed handling stream with no data blob (https://github.com/lbryio/lbry/issues/905)
* Fixed fetching the external ip
* Fixed API call to blob_list with --uri parameter (https://github.com/lbryio/lbry/issues/895)
* Fixed publish command to allow updating claims with bid amount higher than wallet balance(by spending the claimtrietx coin) (https://github.com/lbryio/lbry/issues/748)

### Deprecated
* `channel_list_mine`, replaced with `channel_list`
Expand Down
3 changes: 0 additions & 3 deletions lbrynet/core/Wallet.py
Expand Up @@ -537,9 +537,6 @@ def claim_name(self, name, bid, metadata, certificate_id=None, claim_address=Non
decoded = ClaimDict.load_dict(metadata)
serialized = decoded.serialized

if self.get_balance() < Decimal(bid):
raise InsufficientFundsError()

claim = yield self._send_name_claim(name, serialized.encode('hex'),
bid, certificate_id, claim_address, change_address)

Expand Down
6 changes: 0 additions & 6 deletions lbrynet/daemon/Daemon.py
Expand Up @@ -715,8 +715,6 @@ def _publish_stream(self, name, bid, claim_dict, file_path=None, certificate_id=
publisher = Publisher(self.session, self.lbry_file_manager, self.session.wallet,
certificate_id)
parse_lbry_uri(name)
if bid <= 0.0:
raise Exception("Invalid bid")
if not file_path:
stream_hash = yield self.storage.get_stream_hash_for_sd_hash(claim_dict['stream']['source']['source'])
claim_out = yield publisher.publish_stream(name, bid, claim_dict, stream_hash, claim_address,
Expand Down Expand Up @@ -2004,10 +2002,6 @@ def jsonrpc_publish(self, name, bid, metadata=None, file_path=None, fee=None, ti
if bid <= 0.0:
raise Exception("Invalid bid")

if bid >= self.session.wallet.get_balance():
raise InsufficientFundsError('Insufficient funds. ' \
'Make sure you have enough LBC to deposit')

metadata = metadata or {}
if fee is not None:
metadata['fee'] = fee
Expand Down

0 comments on commit 41543a9

Please sign in to comment.