(plugin, cmd)
| 14 | |
| 15 | |
| 16 | def bcli(plugin, cmd): |
| 17 | ret = subprocess.run([cli, |
| 18 | '-datadir={}'.format(plugin.get_option("bitcoin-datadir")), |
| 19 | '-rpcuser={}'.format(plugin.get_option("bitcoin-rpcuser")), |
| 20 | '-rpcpassword={}'.format(plugin.get_option("bitcoin-rpcpassword")), |
| 21 | '-rpcport={}'.format(plugin.get_option("bitcoin-rpcport"))] |
| 22 | + cmd, stdout=subprocess.PIPE) |
| 23 | if ret.returncode != 0: |
| 24 | return None |
| 25 | return ret.stdout.decode('utf-8') |
| 26 | |
| 27 | |
| 28 | @plugin.method("estimatefees") |
no test coverage detected