A plugin that sets an arbitary fee for incoming channels. Helper to test encrypted recepient data handling.
(plugin)
| 7425 | FINAL_AMT = 1000000 |
| 7426 | |
| 7427 | def bad_topology(plugin): |
| 7428 | """A plugin that sets an arbitary fee for incoming channels. Helper to |
| 7429 | test encrypted recepient data handling.""" |
| 7430 | |
| 7431 | @plugin.init() |
| 7432 | def init(configuration, options, plugin): |
| 7433 | plugin.incoming = None |
| 7434 | |
| 7435 | @plugin.hook("rpc_command") |
| 7436 | def on_rpc_command(plugin, rpc_command, **kwargs): |
| 7437 | if rpc_command["method"] == "listincoming" and plugin.incoming: |
| 7438 | plugin.log( |
| 7439 | "Producing fake listincoming with {}".format(plugin.incoming) |
| 7440 | ) |
| 7441 | return {"return": {"result": {"incoming": [plugin.incoming]}}} |
| 7442 | return {"result": "continue"} |
| 7443 | |
| 7444 | @plugin.method("setincoming") |
| 7445 | def setincoming(plugin, channel): |
| 7446 | plugin.incoming = channel |
| 7447 | |
| 7448 | def get_onion( |
| 7449 | rpc, invoice, blockheight, my_node, entry_point, scid, in_amount, final_amount |
nothing calls this directly
no outgoing calls
no test coverage detected