merge conflicts

This commit is contained in:
Jack Robison 2022-01-31 16:48:13 -05:00
parent a4bb4db8dd
commit 16bfb8589b
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -55,7 +55,7 @@ class BaseResolveTestCase(CommandTestCase):
async def assertNoClaimForName(self, name: str): async def assertNoClaimForName(self, name: str):
lbrycrd_winning = json.loads(await self.blockchain._cli_cmnd('getclaimsforname', name)) lbrycrd_winning = json.loads(await self.blockchain._cli_cmnd('getclaimsforname', name))
stream, channel, _, _ = await self.conductor.spv_node.server.bp.db.resolve(name) stream, channel, _, _ = await self.conductor.spv_node.server.db.resolve(name)
if 'claims' in lbrycrd_winning and lbrycrd_winning['claims'] is not None: if 'claims' in lbrycrd_winning and lbrycrd_winning['claims'] is not None:
self.assertEqual(len(lbrycrd_winning['claims']), 0) self.assertEqual(len(lbrycrd_winning['claims']), 0)
if stream is not None: if stream is not None:
@ -78,7 +78,7 @@ class BaseResolveTestCase(CommandTestCase):
async def assertMatchWinningClaim(self, name): async def assertMatchWinningClaim(self, name):
expected = json.loads(await self.blockchain._cli_cmnd('getclaimsfornamebybid', name, "[0]")) expected = json.loads(await self.blockchain._cli_cmnd('getclaimsfornamebybid', name, "[0]"))
stream, channel, _, _ = await self.conductor.spv_node.server.bp.db.resolve(name) stream, channel, _, _ = await self.conductor.spv_node.server.db.resolve(name)
claim = stream if stream else channel claim = stream if stream else channel
expected['claims'][0]['lasttakeoverheight'] = expected['lasttakeoverheight'] expected['claims'][0]['lasttakeoverheight'] = expected['lasttakeoverheight']
await self._assertMatchClaim(expected['claims'][0], claim) await self._assertMatchClaim(expected['claims'][0], claim)
@ -126,7 +126,7 @@ class BaseResolveTestCase(CommandTestCase):
total_lbrycrd_amount = 0.0 total_lbrycrd_amount = 0.0
total_es_amount = 0.0 total_es_amount = 0.0
active_es_amount = 0.0 active_es_amount = 0.0
db = self.conductor.spv_node.server.bp.db db = self.conductor.spv_node.server.db
es_supports = db.get_supports(bytes.fromhex(claim_id)) es_supports = db.get_supports(bytes.fromhex(claim_id))
# we're only concerned about active supports here, and they should match # we're only concerned about active supports here, and they should match
@ -149,7 +149,7 @@ class BaseResolveTestCase(CommandTestCase):
async def assertMatchClaimsForName(self, name): async def assertMatchClaimsForName(self, name):
expected = json.loads(await self.blockchain._cli_cmnd('getclaimsforname', name, "", "true")) expected = json.loads(await self.blockchain._cli_cmnd('getclaimsforname', name, "", "true"))
db = self.conductor.spv_node.server.bp.db db = self.conductor.spv_node.server.db
for c in expected['claims']: for c in expected['claims']:
c['lasttakeoverheight'] = expected['lasttakeoverheight'] c['lasttakeoverheight'] = expected['lasttakeoverheight']
@ -670,7 +670,7 @@ class ResolveClaimTakeovers(BaseResolveTestCase):
async def assertNameState(self, height: int, name: str, winning_claim_id: str, last_takeover_height: int, async def assertNameState(self, height: int, name: str, winning_claim_id: str, last_takeover_height: int,
non_winning_claims: List[ClaimStateValue]): non_winning_claims: List[ClaimStateValue]):
self.assertEqual(height, self.conductor.spv_node.server.bp.db.db_height) self.assertEqual(height, self.conductor.spv_node.server.db.db_height)
await self.assertMatchClaimIsWinning(name, winning_claim_id) await self.assertMatchClaimIsWinning(name, winning_claim_id)
for non_winning in non_winning_claims: for non_winning in non_winning_claims:
claim = await self.assertMatchClaim(name, claim = await self.assertMatchClaim(name,