def test_register_editions_qty_history(federation, alice, registered_piece_hashes, spool_regtest, spider, rpconn):
    txid = spool_regtest.editions(('', federation), alice, registered_piece_hashes, b'federation-secret', 3, min_confirmations=1)
    rpconn.generate(1)
    history = spider.history(registered_piece_hashes[0])
    assert (len(history) == 2)
    assert ('' in history)
    assert (0 in history)
    assert (len(history['']) == 1)
    assert (len(history[0]) == 1)
    editions_data = history[0][0]
    assert (editions_data['action'] == 'EDITIONS')
    assert (editions_data['edition_number'] == 0)
    assert (editions_data['from_address'] == federation)
    assert (editions_data['number_editions'] == 3)
    assert (editions_data['piece_address'] == registered_piece_hashes[0])
    assert editions_data['timestamp_utc']
    assert (editions_data['to_address'] == alice)
    assert (editions_data['txid'] == txid)
    assert (editions_data['verb'] == b'ASCRIBESPOOL01EDITIONS3')
def test_register_editions_qty_history(federation, alice, registered_piece_hashes, spool_regtest, spider, rpconn):
    txid = spool_regtest.editions((, federation), alice, registered_piece_hashes, b'federation-secret', 3, min_confirmations=1)
    rpconn.generate(1)
    history = spider.history(registered_piece_hashes[0])
    assert (len(history) == 2)
    assert ( in history)
    assert (0 in history)
    assert (len(history[]) == 1)
    assert (len(history[0]) == 1)
    editions_data = history[0][0]
    assert (editions_data['action'] == 'EDITIONS')
    assert (editions_data['edition_number'] == 0)
    assert (editions_data['from_address'] == federation)
    assert (editions_data['number_editions'] == 3)
    assert (editions_data['piece_address'] == registered_piece_hashes[0])
    assert editions_data['timestamp_utc']
    assert (editions_data['to_address'] == alice)
    assert (editions_data['txid'] == txid)
    assert (editions_data['verb'] == b'ASCRIBESPOOL01EDITIONS3')