Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9d44713

Browse files
author
JonathanCoe
committed
Fix minor bug in api.py
1 parent 85655e4 commit 9d44713

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def _handle_request(self, method, params):
231231
with shared.inventoryLock:
232232
for hash, storedValue in shared.inventory.items():
233233
objectType, streamNumber, payload, expiresTime, tag, receivedTime = storedValue
234-
if objectType == OBJECT_TYPE_PUBKEY and tag == requestedTag:
234+
if objectType == self.OBJECT_TYPE_PUBKEY and tag == requestedTag:
235235
if len(payload) <= self.MAX_PAYLOAD_SIZE_TO_RETURN:
236236
return self.outputPayload("pubkeyPayload", payload)
237237
else:
@@ -250,7 +250,7 @@ def _handle_request(self, method, params):
250250
with shared.inventoryLock:
251251
for hash, storedValue in shared.inventory.items():
252252
objectType, streamNumber, payload, expiresTime, tag, receivedTime = storedValue
253-
if objectType == OBJECT_TYPE_MSG and receivedTime > receivedSinceTime and receivedTime < receivedBeforeTime:
253+
if objectType == self.OBJECT_TYPE_MSG and receivedTime > receivedSinceTime and receivedTime < receivedBeforeTime:
254254
if len(payload) <= self.MAX_PAYLOAD_SIZE_TO_RETURN:
255255
output = self.addPayloadToOutput(output, payload)
256256
if output == []:

0 commit comments

Comments
 (0)