def creat_num_commit_tx(num, account, usk, pk, GID, UID, steemd_instance, wallet_instance, ttitle="paper_title", tbody="paper_body"): ssiglist = [] permlinklist = [] txlist = [] threads = [] for i in range(num): t = MyThread(creat_commit_tx, args=(account, usk, pk, GID, UID, steemd_instance, wallet_instance, ttitle, tbody)) threads.append(t) for t in threads: t.start() for t in threads: t.join() for t in threads: ssig, permlink, commit_tx = t.get_result() ssiglist.append(ssig) permlinklist.append(permlink) txlist.append(commit_tx) return ssiglist, permlinklist, txlist
def mul_tx_broad(txlist): threads = [] for tx in txlist: t = MyThread(tx_broad, args=(tx,)) threads.append(t) for t in threads: t.start() for t in threads: t.join()
def one_mul_open_tx(account, ssiglistone, userID, permlinklistone, steemd , wallet): threads = [] for i in range(nodeTX): t = MyThread(open_tx, args=(account, ssiglistone[i], userID, permlinklistone[i], steemd, wallet)) threads.append(t) for t in threads: t.start() for t in threads: t.join()
def mul_open_tx(ssiglist, permlinklist, userID): threads = [] for i in range(n): # t = MyThread(open_tx, # args=(accountlist[i], ssiglist[i], userID, permlinklist[i], clientlist[i].steemd, clientlist[i].wallet)) t = MyThread(one_mul_open_tx, args=(accountlist[i], ssiglist[i], userID, permlinklist[i], clientlist[i].steemd, clientlist[i].wallet)) threads.append(t) for t in threads: t.start() for t in threads: t.join()
def creat_num_open_tx(num, account, ssiglist, userID, permlinklist, steemd_instance, wallet_instance): opentxlist=[] threads = [] for i in range(num): t = MyThread(creat_open_tx, args=(account, ssiglist[i], userID, permlinklist[i], steemd_instance, wallet_instance)) threads.append(t) for t in threads: t.start() for t in threads: t.join() for t in threads: opentx = t.get_result() opentxlist.append(opentx) return opentxlist
def one_mul_annoy_tx(account, usk, pk, UID, steemd, wallet): ssiglistone=[] permlinklistone=[] threads = [] for i in range(nodeTX): t = MyThread(annoy_commit_tx, args=(account, usk, pk, GID, UID, steemd, wallet)) threads.append(t) for t in threads: t.start() for t in threads: t.join() for t in threads: ssig, permlink = t.get_result() ssiglistone.append(ssig) permlinklistone.append(permlink) return ssiglistone, permlinklistone
def mul_annoy_tx(usk, pk, UID): ssiglist=[] permlinklist=[] threads = [] for i in range(n): # t = MyThread(annoy_commit_tx, args=(accountlist[i], usk, pk, GID, UID, clientlist[i].steemd, clientlist[i].wallet)) t = MyThread(one_mul_annoy_tx, args=(accountlist[i], usk, pk, UID, clientlist[i].steemd, clientlist[i].wallet)) threads.append(t) for t in threads: t.start() for t in threads: t.join() for t in threads: ssig, permlink = t.get_result() ssiglist.append(ssig) permlinklist.append(permlink) return ssiglist, permlinklist