diff --git a/lbry/wallet/server/leveldb.py b/lbry/wallet/server/leveldb.py index f808f55bc..34b669c81 100644 --- a/lbry/wallet/server/leveldb.py +++ b/lbry/wallet/server/leveldb.py @@ -129,12 +129,12 @@ class LevelDB: self.blocked_streams = {} self.blocked_channels = {} self.blocking_channel_hashes = { - bytes.fromhex(channel_id)[::-1] for channel_id in blocking_channels if channel_id + bytes.fromhex(channel_id) for channel_id in blocking_channels if channel_id } self.filtered_streams = {} self.filtered_channels = {} self.filtering_channel_hashes = { - bytes.fromhex(channel_id)[::-1] for channel_id in filtering_channels if channel_id + bytes.fromhex(channel_id) for channel_id in filtering_channels if channel_id } self.tx_counts = None diff --git a/tests/integration/blockchain/test_claim_commands.py b/tests/integration/blockchain/test_claim_commands.py index 07f787437..7d3e44656 100644 --- a/tests/integration/blockchain/test_claim_commands.py +++ b/tests/integration/blockchain/test_claim_commands.py @@ -1537,7 +1537,13 @@ class StreamCommands(ClaimTestCase): blocking_channel_id = self.get_claim_id( await self.channel_create('@blocking', '0.1') ) - self.conductor.spv_node.server.db.blocking_channel_hashes.add(bytes.fromhex(blocking_channel_id)) + # test setting from env vars and starting from scratch + await self.conductor.spv_node.stop(False) + await self.conductor.spv_node.start(self.conductor.blockchain_node, + extraconf={'BLOCKING_CHANNEL_IDS': blocking_channel_id, + 'FILTERING_CHANNEL_IDS': filtering_channel_id}) + await self.daemon.wallet_manager.reset() + self.assertEqual(0, len(self.conductor.spv_node.server.db.blocked_streams)) await self.stream_repost(bad_content_id, 'block1', '0.1', channel_name='@blocking') self.assertEqual(1, len(self.conductor.spv_node.server.db.blocked_streams))