コード例 #1
0
 def _revert_pending_transaction_filter(self, filter):
     is_valid_transaction_hash = excepts(
         (TransactionNotFound,),
         compose(
             bool,
             self.get_transaction_by_hash,
             self.normalizer.normalize_outbound_transaction_hash,
         ),
         lambda v: False,
     )
     values_to_remove = remove(is_valid_transaction_hash, filter.get_all())
     filter.remove(*values_to_remove)
コード例 #2
0
 def _revert_block_filter(self, filter):
     is_valid_block_hash = excepts(
         (BlockNotFound,),
         compose(
             bool,
             self.get_block_by_hash,
             self.normalizer.normalize_outbound_block_hash,
         ),
         lambda v: False,
     )
     values_to_remove = tuple(remove(is_valid_block_hash, filter.get_all()))
     filter.remove(*values_to_remove)