mirror of
https://github.com/logos-blockchain/logos-blockchain-specs.git
synced 2026-01-11 09:33:09 +00:00
Use dispersal proto message in poc executor
This commit is contained in:
parent
d921d64411
commit
cba4016461
@ -9,6 +9,7 @@ from constants import HASH_LENGTH, PROTOCOL_ID
|
||||
from libp2p import host, new_host
|
||||
from libp2p.network.stream.net_stream_interface import INetStream
|
||||
from libp2p.peer.peerinfo import info_from_p2p_addr
|
||||
from da.network.dispersal import proto
|
||||
|
||||
|
||||
class Executor:
|
||||
@ -94,4 +95,9 @@ class Executor:
|
||||
Send data to peer (async)
|
||||
The index is the subnet number
|
||||
"""
|
||||
await stream.write(self.data[index])
|
||||
|
||||
blob_id = sha256(self.data)
|
||||
blob_data = self.data[index]
|
||||
|
||||
message = proto.new_dispersal_req_msg(blob_id, blob_data)
|
||||
await stream.write(message)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user