mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
- exposed websocket port;
- added asset and metadata in websocket stream
This commit is contained in:
parent
44328d7626
commit
d5b715c899
@ -98,9 +98,12 @@ class Dispatcher:
|
||||
|
||||
for tx in block['block']['transactions']:
|
||||
asset_id = tx['id'] if tx['operation'] == 'CREATE' else tx['asset']['id']
|
||||
asset = tx['asset'] if tx['operation'] == 'CREATE' else None
|
||||
data = {'block_id': block['id'],
|
||||
'asset_id': asset_id,
|
||||
'transaction_id': tx['id']}
|
||||
'transaction_id': tx['id'],
|
||||
'asset': asset,
|
||||
'metadata': tx['metadata']}
|
||||
str_buffer.append(json.dumps(data))
|
||||
|
||||
for _, websocket in self.subscribers.items():
|
||||
|
@ -29,5 +29,6 @@ services:
|
||||
BIGCHAINDB_SERVER_BIND: 0.0.0.0:9984
|
||||
BIGCHAINDB_WSSERVER_HOST: 0.0.0.0
|
||||
ports:
|
||||
- "9984"
|
||||
- 9984:9984
|
||||
- 9985:9985
|
||||
command: bigchaindb start
|
||||
|
Loading…
x
Reference in New Issue
Block a user