from __future__ import division
+import base64
import random
import tempfile
mynet = math.Object(
PARENT=networks.nets['litecoin_testnet'],
SHARE_PERIOD=3, # seconds
+ NEW_SHARE_PERIOD=5, # seconds
CHAIN_LENGTH=20*60//3, # shares
REAL_CHAIN_LENGTH=20*60//3, # shares
TARGET_LOOKBEHIND=200, # shares
SPREAD=12, # blocks
+ NEW_SPREAD=3, # blocks
IDENTIFIER='cca5e24ec6408b1e'.decode('hex'),
PREFIX='ad9614f6466a39cf'.decode('hex'),
P2P_PORT=19338,
worker_interface.WorkerInterface(wb).attach_to(web_root)
port = reactor.listenTCP(0, server.Site(web_root))
- proxy = jsonrpc.HTTPProxy('http://127.0.0.1:' + str(port.getHost().port))
+ proxy = jsonrpc.HTTPProxy('http://127.0.0.1:' + str(port.getHost().port),
+ headers=dict(Authorization='Basic ' + base64.b64encode('user/0:password')))
yield deferral.sleep(3)
yield deferral.sleep(3)
for i in xrange(SHARES):
- proxy = jsonrpc.HTTPProxy('http://127.0.0.1:' + str(random.choice(nodes).web_port.getHost().port))
+ proxy = jsonrpc.HTTPProxy('http://127.0.0.1:' + str(random.choice(nodes).web_port.getHost().port),
+ headers=dict(Authorization='Basic ' + base64.b64encode('user/0:password')))
blah = yield proxy.rpc_getwork()
yield proxy.rpc_getwork(blah['data'])
yield deferral.sleep(.05)