def get_cost_for_certificate_batch(dust_threshold, recommended_fee_per_transaction, satoshi_per_byte, num_outputs, allow_transfer, num_transfer_outputs, num_issuing_transactions): issuing_costs = trx_utils.get_cost(recommended_fee_per_transaction, dust_threshold, satoshi_per_byte, num_outputs) # plus additional fees for transfer if allow_transfer: transfer_costs = trx_utils.get_cost(recommended_fee_per_transaction, dust_threshold, satoshi_per_byte, num_transfer_outputs) else: transfer_costs = None return TotalCosts(num_issuing_transactions, issuing_transaction_cost=issuing_costs, transfer_cost=transfer_costs)
def get_cost_for_certificate_batch(num_outputs, allow_transfer): """ Get cost for the batch of certificates :param num_outputs: :param allow_transfer: :return: """ issuing_costs = trx_utils.get_cost(num_outputs) # plus additional fees for transfer if allow_transfer: issuing_costs.set_transfer_fee(recommended_fee) return issuing_costs
def test_get_cost_4(self): result = trx_utils.get_cost(2000) self.assertEqual(result.total, 8296282)
def test_get_cost_3(self): result = trx_utils.get_cost(1000) self.assertEqual(result.total, 4152282)
def test_get_cost_2(self): result = trx_utils.get_cost(4) self.assertEqual(result.total, 24858)
def test_get_cost_1(self): result = trx_utils.get_cost(1) self.assertEqual(result.total, 12750)
def test_get_cost(self): result = trx_utils.get_cost(0.0001, 0.0000275, 41, 4) self.assertEqual(result.total, 23095) result = trx_utils.get_cost(0.0001, 0.0000275, 41, 1) self.assertEqual(result.total, 12750)