From 8afe178d62dcf5ca22c460928384180719feb335 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Wed, 15 May 2019 23:17:42 -0300 Subject: [PATCH] remove supports from resolve --- lbrynet/wallet/server/session.py | 6 ++++-- tests/integration/test_chris45.py | 8 ++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/lbrynet/wallet/server/session.py b/lbrynet/wallet/server/session.py index 1584760a7..074cea0c7 100644 --- a/lbrynet/wallet/server/session.py +++ b/lbrynet/wallet/server/session.py @@ -190,7 +190,7 @@ class LBRYElectrumX(ElectrumX): claims = await self.daemon.getclaimsforname(name) if claims: claims['claims'] = [self.format_claim_from_daemon(claim, name) for claim in claims['claims']] - claims['supports_without_claims'] = claims['supports without claims'] + claims['supports_without_claims'] = [] # fixme temporary del claims['supports without claims'] claims['last_takeover_height'] = claims['nLastTakeoverHeight'] del claims['nLastTakeoverHeight'] @@ -224,7 +224,9 @@ class LBRYElectrumX(ElectrumX): # raise RPCError("Lbrycrd has {} but not lbryumx, please submit a bug report.".format(claim_id)) return {} address = info.address.decode() - supports = self.format_supports_from_daemon(claim.get('supports', [])) + # fixme: temporary + #supports = self.format_supports_from_daemon(claim.get('supports', [])) + supports = [] amount = get_from_possible_keys(claim, 'amount', 'nAmount') height = get_from_possible_keys(claim, 'height', 'nHeight') diff --git a/tests/integration/test_chris45.py b/tests/integration/test_chris45.py index 6628d04fc..4cafde1b3 100644 --- a/tests/integration/test_chris45.py +++ b/tests/integration/test_chris45.py @@ -138,8 +138,6 @@ class EpicAdventuresOfChris45(CommandTestCase): # It obviously did! Because, blockchain baby \O/ self.assertEqual(resolve_result[uri]['claim']['amount'], '1.0') self.assertEqual(resolve_result[uri]['claim']['effective_amount'], '1.2') - self.assertEqual(resolve_result[uri]['claim']['supports'][0]['amount'], '0.2') - self.assertEqual(resolve_result[uri]['claim']['supports'][0]['txid'], tx['txid']) await self.generate(5) # Now he also wanted to support the original creator of the Award Winning Novel @@ -152,8 +150,7 @@ class EpicAdventuresOfChris45(CommandTestCase): # And again checks if it went to the just right place resolve_result = await self.out(self.daemon.jsonrpc_resolve(uri)) # Which it obviously did. Because....????? - self.assertEqual(resolve_result[uri]['claim']['supports'][1]['amount'], '0.3') - self.assertEqual(resolve_result[uri]['claim']['supports'][1]['txid'], tx['txid']) + self.assertEqual(resolve_result[uri]['claim']['effective_amount'], '1.5') await self.generate(5) # Seeing the ravishing success of his novel Chris adds support to his claim too @@ -163,8 +160,7 @@ class EpicAdventuresOfChris45(CommandTestCase): # And check if his support showed up resolve_result = await self.out(self.daemon.jsonrpc_resolve(uri)) # It did! - self.assertEqual(resolve_result[uri]['claim']['supports'][2]['amount'], '0.4') - self.assertEqual(resolve_result[uri]['claim']['supports'][2]['txid'], tx['txid']) + self.assertEqual(resolve_result[uri]['claim']['effective_amount'], '1.9') await self.generate(5) # Now Ramsey who is a singer by profession, is preparing for his new "gig". He has everything in place for that