def send_inv(self, obj):
    mtype = (2 if isinstance(obj, CBlock) else 1)
    self.conn.send_message(msg_inv([CInv(mtype, obj.sha256)]))
def send_inv(self, obj):
    mtype = (2 if isinstance(obj, CBlock) else 1)
    self.conn.send_message(msg_inv([CInv(mtype, obj.sha256)]))