tests: update lnbase test to use 4-tuple for invoices

This commit is contained in:
Janus 2019-01-30 01:45:13 +01:00 committed by ThomasV
parent 281d51c002
commit 4e3b2b5479

View file

@ -16,7 +16,7 @@ from electrum.util import bh2u
from electrum.lnbase import Peer, decode_msg, gen_msg from electrum.lnbase import Peer, decode_msg, gen_msg
from electrum.lnutil import LNPeerAddr, Keypair, privkey_to_pubkey from electrum.lnutil import LNPeerAddr, Keypair, privkey_to_pubkey
from electrum.lnutil import LightningPeerConnectionClosed, RemoteMisbehaving from electrum.lnutil import LightningPeerConnectionClosed, RemoteMisbehaving
from electrum.lnutil import PaymentFailure from electrum.lnutil import PaymentFailure, RECEIVED
from electrum.lnrouter import ChannelDB, LNPathFinder from electrum.lnrouter import ChannelDB, LNPathFinder
from electrum.lnworker import LNWorker from electrum.lnworker import LNWorker
@ -189,7 +189,7 @@ class TestPeer(unittest.TestCase):
('d', 'coffee') ('d', 'coffee')
]) ])
pay_req = lnencode(addr, w2.node_keypair.privkey) pay_req = lnencode(addr, w2.node_keypair.privkey)
w2.invoices[bh2u(RHASH)] = (bh2u(payment_preimage), pay_req) w2.invoices[bh2u(RHASH)] = (bh2u(payment_preimage), pay_req, RECEIVED, None)
return pay_req return pay_req
@staticmethod @staticmethod