mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Problem: Block height in event stream is string. (#2167)
This commit is contained in:
parent
e4e528e5c4
commit
25043bc993
@ -50,7 +50,7 @@ def process_event(event_queue, event, stream_id):
|
||||
# Only push non empty blocks
|
||||
if block_txs:
|
||||
block_txs = [decode_transaction_base64(txn) for txn in block_txs]
|
||||
new_block = {'id': str(block_id), 'transactions': block_txs}
|
||||
new_block = {'height': block_id, 'transactions': block_txs}
|
||||
event = Event(EventTypes.BLOCK_VALID, new_block)
|
||||
event_queue.put(event)
|
||||
|
||||
|
@ -35,6 +35,8 @@ def test_process_event_new_block():
|
||||
event_queue = Queue()
|
||||
process_event(event_queue, event, 'test_stream_id')
|
||||
assert not event_queue.empty()
|
||||
block = event_queue.get()
|
||||
assert isinstance(block.data['height'], int)
|
||||
|
||||
|
||||
def test_process_event_empty_block():
|
||||
|
Loading…
x
Reference in New Issue
Block a user