MCPcopy Create free account
hub / github.com/ElementsProject/elements / on_inv

Method on_inv

test/functional/test_framework/p2p.py:773–779  ·  view source on GitHub ↗
(self, message)

Source from the content-addressed store, hash-verified

771 self.tx_invs_received = defaultdict(int)
772
773 def on_inv(self, message):
774 super().on_inv(message) # Send getdata in response.
775 # Store how many times invs have been received for each tx.
776 for i in message.inv:
777 if (i.type == MSG_TX) or (i.type == MSG_WTX):
778 # save txid
779 self.tx_invs_received[i.hash] += 1
780
781 def get_invs(self):
782 with p2p_lock:

Callers

nothing calls this directly

Calls 1

on_invMethod · 0.45

Tested by

no test coverage detected