Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbe08ec5

Browse files
committed
optimize sync interest buffer
1 parent62f9113 commitbe08ec5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎ndn_python_repo/utils/passive_svs.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ def sync_handler(self, name: FormalName, _param: InterestParam, _app_param: Bina
110110

111111
need_fetch=False
112112
forrsv_id,rsv_seqinrsv_dict.items():
113+
already_sent= []
113114
lsv_seq=self.local_sv.get(rsv_id,0)
114115
iflsv_seq<rsv_seq:
115116
# Remote is latest
@@ -121,7 +122,10 @@ def sync_handler(self, name: FormalName, _param: InterestParam, _app_param: Bina
121122
# Local is latest
122123
self.logger.debug(f'Outdated remote on: [{Name.to_str(rsv_id)}]:{rsv_seq} <{lsv_seq}')
123124
raw_inst=self.inst_buffer[rsv_id]
124-
self.send_interest(raw_inst)
125+
ifraw_instnotinalready_sent:
126+
already_sent.append(raw_inst)
127+
self.send_interest(raw_inst)
128+
else:pass
125129

126130
# Notify remote there are mising nodes
127131
diff=self.local_sv.keys()-rsv_dict.keys()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp