mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 23:54:22 +01:00
pytest: test Bitcoin plugin registration and the bcli plugin
This commit is contained in:
26
tests/plugins/bitcoin/part2.py
Executable file
26
tests/plugins/bitcoin/part2.py
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
This registers part of the Bitcoin backend methods.
|
||||
We only use it for testing startup and we don't care about the actual values.
|
||||
"""
|
||||
import time
|
||||
|
||||
from pyln.client import Plugin
|
||||
|
||||
|
||||
plugin = Plugin()
|
||||
|
||||
|
||||
@plugin.method("sendrawtransaction")
|
||||
def sendtx(plugin, **kwargs):
|
||||
time.sleep(1)
|
||||
return {}
|
||||
|
||||
|
||||
@plugin.method("getutxout")
|
||||
def gettxout(plugin, **kwargs):
|
||||
time.sleep(1)
|
||||
return {}
|
||||
|
||||
|
||||
plugin.run()
|
||||
Reference in New Issue
Block a user