def get_payment_info(self, payment_hash: bytes) -> Optional[PaymentInfo]:
    'returns None if payment_hash is a payment we are forwarding'
    key = payment_hash.hex()
    with self.lock:
        if (key in self.payments):
            (amount_msat, direction, status) = self.payments[key]
            return PaymentInfo(payment_hash, amount_msat, direction, status)
returns None if payment_hash is a payment we are forwarding
def get_payment_info(self, payment_hash: bytes) -> Optional[PaymentInfo]:
    
    key = payment_hash.hex()
    with self.lock:
        if (key in self.payments):
            (amount_msat, direction, status) = self.payments[key]
            return PaymentInfo(payment_hash, amount_msat, direction, status)