1
0

remove bccapi things; move send_tx to backend

This commit is contained in:
ThomasV
2012-03-20 11:27:36 +03:00
parent 55478e0d1f
commit 4a03f571b4
2 changed files with 18 additions and 83 deletions

View File

@@ -340,6 +340,20 @@ class MyStore(Datastore_class):
store.commit()
def send_tx(self,tx):
postdata = dumps({"method": 'importtransaction', 'params': [tx], 'id':'jsonrpc'})
respdata = urllib.urlopen(self.bitcoind_url, postdata).read()
r = loads(respdata)
if r['error'] != None:
out = "error: transaction rejected by memorypool\n"+tx
else:
out = r['result']
return out
def main_iteration(store):
try:
dblock.acquire()