electrum-personal-server

Maximally lightweight electrum server for a single user
git clone https://git.parazyd.org/electrum-personal-server
Log | Files | Refs | README

commit db78fb9e2d819f80b7501c43d56d96b8c22f4237
parent 7cc939b8ab2565e976d9983ca4108cc3e3157b11
Author: chris-belcher <chris-belcher@users.noreply.github.com>
Date:   Tue, 14 Jan 2020 13:54:34 +0000

Fix import to peertopeer tor broadcast

Actually tested this time.

Diffstat:
Melectrumpersonalserver/server/electrumprotocol.py | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/electrumpersonalserver/server/electrumprotocol.py b/electrumpersonalserver/server/electrumprotocol.py @@ -14,7 +14,7 @@ from electrumpersonalserver.server.hashes import ( bytes_fmt ) from .jsonrpc import JsonRpc, JsonRpcError -import electrumpersonalserver.server.peertopeer as peertopeer +from electrumpersonalserver.server.peertopeer import tor_broadcast_tx from electrumpersonalserver.server.merkleproof import ( convert_core_to_electrum_merkle_proof ) @@ -329,6 +329,7 @@ class ElectrumProtocol(object): self.logger.info("Tor detected at " + str(tor_hostport) + ". Broadcasting through tor.") broadcast_method = "tor" + self.tor_hostport = tor_hostport else: self.logger.info("Could not detect tor. Broadcasting " + "through own node.") @@ -352,8 +353,8 @@ class ElectrumProtocol(object): elif chaininfo["chain"] == "regtest": network = "regtest" self.logger.debug("broadcasting to network: " + network) - peertopeer.tor_broadcast_tx(txhex, tor_hostport, network, - self.rpc, logger) + tor_broadcast_tx(txhex, self.tor_hostport, network, + self.rpc, self.logger) elif broadcast_method.startswith("system "): with tempfile.NamedTemporaryFile() as fd: system_line = broadcast_method[7:].replace("%s",