コード例 #1
0
def schedule_block_for_broadcast_sync(block_id: str, time: int = 0) -> None:
    """Schedule a certain block to be checked by the broadcast processor (sync)
    Args:
        block_id: block_id to schedule
        time: unix timestamp to re-schedule for checking (0 means ASAP)
    """
    redis.zadd_sync(IN_FLIGHT_KEY, {block_id: time})
コード例 #2
0
ファイル: redis_utest.py プロジェクト: uningan/dragonchain
 def test_zadd(self):
     redis.zadd_sync("banana", "banana")
     redis.redis_client.zadd.assert_called_once_with("banana",
                                                     "banana",
                                                     ch=False,
                                                     incr=False,
                                                     nx=False,
                                                     xx=False)