def test_dispatcher_txs(self):
     args = TestArgs()
     args.proxy = "http://localhost:7950"
     args.pem = "./../../../file.pem"
     queue = TransactionQueue()
     queue.dispatch_transactions(args)
     self.assertFalse(False)
def write_in_queue():
    args = _create_mock_args()
    queue = TransactionQueue()

    idx = 0
    while idx < 5000:
        args.value = str(idx)
        queue.enqueue_transaction(args)
        time.sleep(0.001)
        idx += 1
    def test_multi_thread(self):
        _thread.start_new_thread(write_in_queue, ())

        args = TestArgs()
        args.proxy = "http://localhost:7950"
        args.pem = "./../../../file.pem"
        args.interval = 2
        queue = TransactionQueue()
        queue.dispatch_transactions_continuously(args)

        self.assertFalse(False)
 def test_clean(self):
     queue = TransactionQueue()
     queue.clean_transactions_queue()
     self.assertFalse(False)
Exemple #5
0
def clean_transactions_queue():
    queue = TransactionQueue()
    queue.clean_transactions_queue()
Exemple #6
0
def dispatch_transactions_continuously(args):
    queue = TransactionQueue()
    queue.dispatch_transactions_continuously(args)
Exemple #7
0
def dispatch_transactions(args):
    queue = TransactionQueue()
    queue.dispatch_transactions(args)
Exemple #8
0
def enqueue_transaction(args):
    queue = TransactionQueue()
    queue.enqueue_transaction(args)