(self, message)
| 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: |