Skip to content

Commit

Permalink
fixup! df: add tests for burning + df
Browse files Browse the repository at this point in the history
  • Loading branch information
niftynei committed Oct 10, 2019
1 parent a497227 commit a61e825
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions tests/plugins/funder.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
they've requested.
"""

from lightning import Plugin, RpcError, Millisatoshi
from lightning import Plugin, Millisatoshi

plugin = Plugin()

Expand All @@ -22,9 +22,9 @@ def on_openchannel(openchannel, plugin, **kwargs):
# We send back our maximum available funds
if their_funds.to_satoshi() % 2 == 1:
our_funds = Millisatoshi(openchannel['available_funds'])
return {'result': 'continue', 'funding_sats': our_funds }
return {'result': 'continue', 'funding_sats': our_funds}
else:
return {'result': 'continue', 'funding_sats': their_funds }
return {'result': 'continue', 'funding_sats': their_funds}


plugin.run()
3 changes: 2 additions & 1 deletion tests/test_opening.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import pytest
import unittest


@unittest.skipIf(not EXPERIMENTAL_FEATURES, "dual funding is experimental")
def test_two_sided_open(node_factory, bitcoind):
# We need a plugin to get l2 to contribute funds
Expand Down Expand Up @@ -199,7 +200,7 @@ def mock_sendrawtransaction(r):
return {'id': r['id'], 'error': {'code': 100, 'message': 'sendrawtransaction disabled'}}

# Have two nodes attempt to connect with l3
for node in [l1,l2]:
for node in [l1, l2]:
# Prevent funder from broadcasting funding tx (any tx really).
node.daemon.rpcproxy.mock_rpc('sendrawtransaction', mock_sendrawtransaction)
node.rpc.connect(l3.info['id'], 'localhost', l3.port)
Expand Down

0 comments on commit a61e825

Please sign in to comment.