mirror of
https://github.com/yzernik/squeaknode.git
synced 2026-08-20 13:28:20 +02:00
Add download replies button (#965)
* Add download replies rpc command * Add download replies button to squeak page * Use reply to hash in lookup query * Update frontend build
This commit is contained in:
parent
95176be9c0
commit
bf6fbc0ab7
21 changed files with 179 additions and 71 deletions
|
|
@ -510,11 +510,13 @@ class SqueakController:
|
|||
address: str,
|
||||
min_block: int,
|
||||
max_block: int,
|
||||
reply_to_hash: bytes,
|
||||
):
|
||||
return self.squeak_db.lookup_squeaks(
|
||||
[address],
|
||||
min_block,
|
||||
max_block,
|
||||
reply_to_hash,
|
||||
)
|
||||
|
||||
def filter_known_invs(self, invs):
|
||||
|
|
@ -583,6 +585,23 @@ class SqueakController:
|
|||
getdata_msg = msg_getdata(inv=invs)
|
||||
self.broadcast_msg(getdata_msg)
|
||||
|
||||
def download_replies(self, squeak_hash: bytes):
|
||||
logger.info("Downloading replies for squeak: {}".format(
|
||||
squeak_hash.hex(),
|
||||
))
|
||||
interests = [
|
||||
CInterested(
|
||||
hashReplySqk=squeak_hash,
|
||||
)
|
||||
]
|
||||
locator = CSqueakLocator(
|
||||
vInterested=interests,
|
||||
)
|
||||
getsqueaks_msg = msg_getsqueaks(
|
||||
locator=locator,
|
||||
)
|
||||
self.broadcast_msg(getsqueaks_msg)
|
||||
|
||||
def filter_shared_squeak_locator(self, interests: List[CInterested]):
|
||||
ret = []
|
||||
block_range = self.get_block_range()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue