Removed daemon side bid checks during publish

Fixes #748

Fixed failing test, Yay!

Why CHANGELOG? Why not anarchy?
This commit is contained in:
hackrush 2018-02-08 10:24:44 +05:30
parent c4c443d8d7
commit d72ef784ed
3 changed files with 11 additions and 9 deletions

View file

@ -27,6 +27,17 @@ at anytime.
* exception checking in several wallet unit tests
* daemon not erring properly for non-numeric values being passed to the `bid` parameter for the `publish` method
*
* 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`

View file

@ -537,9 +537,6 @@ class Wallet(object):
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)

View file

@ -715,8 +715,6 @@ class Daemon(AuthJSONRPCServer):
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,
@ -2007,10 +2005,6 @@ class Daemon(AuthJSONRPCServer):
if bid <= 0.0:
raise ValueError("Bid value must be greater than 0.0")
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