Permalink
Browse files

don't use unreleased twisted.task.react

  • Loading branch information...
1 parent e3a6c76 commit 8244c6e3b987cfa7f433d97315868a97c75f3d80 @forrestv forrestv committed Dec 17, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 submit_badblock.py
View
@@ -1,16 +1,18 @@
import base64
-from twisted.internet import defer, task
+from twisted.internet import defer, reactor
from twisted.web import resource, server
from p2pool import networks
from p2pool.bitcoin import data, worker_interface, getwork, helper
from p2pool.util import jsonrpc, variable
@defer.inlineCallbacks
-def main(reactor):
+def main():
bitcoind = jsonrpc.Proxy('http://127.0.0.1:8332/', dict(Authorization='Basic ' + base64.b64encode(':password')))
block = data.block_type.unpack(open('badblock').read())
yield helper.submit_block_rpc(block, False, bitcoind, variable.Variable(dict(use_getblocktemplate=True)), networks.nets['bitcoin'])
+ reactor.stop()
-task.react(main, [])
+main()
+reactor.run()

0 comments on commit 8244c6e

Please sign in to comment.