adb: (trivial) receive_tx_callback: make tx_height param kw-only
This commit is contained in:
@@ -34,7 +34,7 @@ class TestWalletPaymentRequests(ElectrumTestCase):
|
||||
funding_tx = Transaction('0200000000010132515e6aade1b79ec7dd3bac0896d8b32c56195d23d07d48e21659cef24301560100000000fdffffff0112841e000000000016001477fe6d2a27e8860c278d4d2cd90bad716bb9521a02473044022041ed68ef7ef122813ac6a5e996b8284f645c53fbe6823b8e430604a8915a867802203233f5f4d347a687eb19b2aa570829ab12aeeb29a24cc6d6d20b8b3d79e971ae012102bee0ee043817e50ac1bb31132770f7c41e35946ccdcb771750fb9696bdd1b307ad951d00')
|
||||
funding_txid = funding_tx.txid()
|
||||
assert 'db949963c3787c90a40fb689ffdc3146c27a9874a970d1fd20921afbe79a7aa9' == funding_txid
|
||||
wallet2.adb.receive_tx_callback(funding_tx, TX_HEIGHT_UNCONFIRMED)
|
||||
wallet2.adb.receive_tx_callback(funding_tx, tx_height=TX_HEIGHT_UNCONFIRMED)
|
||||
return wallet2
|
||||
|
||||
async def test_wallet_with_ln_creates_payreq_and_gets_paid_on_ln(self):
|
||||
@@ -74,7 +74,7 @@ class TestWalletPaymentRequests(ElectrumTestCase):
|
||||
outputs = [PartialTxOutput.from_address_and_value(pr.get_address(), pr.get_amount_sat())]
|
||||
tx = wallet2.make_unsigned_transaction(outputs=outputs, fee_policy=FixedFeePolicy(5000))
|
||||
wallet2.sign_transaction(tx, password=None)
|
||||
wallet1.adb.receive_tx_callback(tx, TX_HEIGHT_UNCONFIRMED)
|
||||
wallet1.adb.receive_tx_callback(tx, tx_height=TX_HEIGHT_UNCONFIRMED)
|
||||
self.assertEqual(PR_UNCONFIRMED, wallet1.get_invoice_status(pr))
|
||||
# tx gets mined
|
||||
wallet1.db.put('stored_height', 1010)
|
||||
@@ -105,7 +105,7 @@ class TestWalletPaymentRequests(ElectrumTestCase):
|
||||
outputs = [PartialTxOutput.from_address_and_value(pr.get_address(), pr.get_amount_sat())]
|
||||
tx = wallet2.make_unsigned_transaction(outputs=outputs, fee_policy=FixedFeePolicy(5000))
|
||||
wallet2.sign_transaction(tx, password=None)
|
||||
wallet1.adb.receive_tx_callback(tx, TX_HEIGHT_UNCONFIRMED)
|
||||
wallet1.adb.receive_tx_callback(tx, tx_height=TX_HEIGHT_UNCONFIRMED)
|
||||
self.assertEqual(PR_UNCONFIRMED, wallet1.get_invoice_status(pr))
|
||||
# tx gets mined
|
||||
wallet1.db.put('stored_height', 1010)
|
||||
@@ -136,7 +136,7 @@ class TestWalletPaymentRequests(ElectrumTestCase):
|
||||
outputs = [PartialTxOutput.from_address_and_value(pr.get_address(), pr.get_amount_sat())]
|
||||
tx = wallet2.make_unsigned_transaction(outputs=outputs, fee_policy=FixedFeePolicy(5000))
|
||||
wallet2.sign_transaction(tx, password=None)
|
||||
wallet1.adb.receive_tx_callback(tx, TX_HEIGHT_UNCONFIRMED)
|
||||
wallet1.adb.receive_tx_callback(tx, tx_height=TX_HEIGHT_UNCONFIRMED)
|
||||
self.assertEqual(PR_UNCONFIRMED, wallet1.get_invoice_status(pr))
|
||||
# tx mined in the past (before invoice creation)
|
||||
tx_info = TxMinedInfo(height=990,
|
||||
@@ -206,7 +206,7 @@ class TestWalletPaymentRequests(ElectrumTestCase):
|
||||
outputs = [PartialTxOutput.from_address_and_value(pr2.get_address(), pr2.get_amount_sat())]
|
||||
tx = wallet2.make_unsigned_transaction(outputs=outputs, fee_policy=FixedFeePolicy(5000))
|
||||
wallet2.sign_transaction(tx, password=None)
|
||||
wallet1.adb.receive_tx_callback(tx, TX_HEIGHT_UNCONFIRMED)
|
||||
wallet1.adb.receive_tx_callback(tx, tx_height=TX_HEIGHT_UNCONFIRMED)
|
||||
self.assertEqual(PR_UNCONFIRMED, wallet1.get_invoice_status(pr2))
|
||||
self.assertEqual(pr2, wallet1.get_request_by_addr(addr1))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user