Example #1
0
def balance_calc(take=100):
    Config.load([
        "config_bitshares_connection.yaml", "config_bitshares.yaml",
        "config_operation_storage.yaml"
    ])

    pprint(factory.get_operation_storage()._get_balances_recalculate(take))
Example #2
0
def only_blockchain_monitor(start, stop):
    Config.load([
        "config_bitshares_connection.yaml", "config_bitshares_memo_keys.yaml",
        "config_bitshares.yaml", "config_operation_storage.yaml"
    ])
    logging.getLogger(__name__).info(
        "Starting BitShares blockchain monitor ...")
    start_block_monitor(start, stop)
    def setUp(self):
        if Config.data:
            connection.reset()

        Config.load()
        Config.load("../tests/config_test.yaml")
        Config.data["operation_storage"]["use"] = "azuretest"
        Config.data["network_type"] = "Test"
        Config.data["bitshares"]["connection"]["Test"]["nobroadcast"] = True
Example #4
0
def tracked():
    Config.load([
        "config_bitshares_connection.yaml", "config_bitshares.yaml",
        "config_operation_storage.yaml"
    ])

    storage = factory.get_operation_storage()

    pprint(
        list(
            storage._service.query_entities(
                storage._azure_config["address_table"] + "balance")))
    def setUp(self):
        # only load the config we want (no active keys!)
        if Config.data and Config.data.get("network_type", None) != "Test":
            connection.reset()

        Config.load(["config_bitshares_connection.yaml",
                     "config_bitshares_memo_keys.yaml",
                     "config_bitshares.yaml",
                     "config_operation_storage.yaml",
                     "../tests/config_test.yaml"])
        Config.data["operation_storage"]["use"] = "mongodbtest"
        Config.data["network_type"] = "Test"
        Config.data["bitshares"]["connection"]["Test"]["nobroadcast"] = True
Example #6
0
def find(txid, customerid, contains, status, incidentid):
    Config.load([
        "config_bitshares_connection.yaml", "config_bitshares.yaml",
        "config_operation_storage.yaml"
    ])

    storage = factory.get_operation_storage()

    def get_all():
        return (storage.get_operations_completed() +
                storage.get_operations_in_progress() +
                storage.get_operations_failed())

    operations = []

    if contains:
        for op in get_all():
            print(op)
            if status is not None and not status == op["status"]:
                continue

            if contains in str(op):
                operations.append(op)

    if incidentid:
        for op in list(
                storage._service.query_entities(
                    storage._operation_tables["incident"])):
            if incidentid in str(op):
                operations.append(op)

    print("---------- finding transfers ---------------")
    print("found: " + str(len(operations)))

    for op in operations:
        pprint(op)
 def setUp(self):
     Config.load()