示例#1
0
def nym_handler(tconf):
    data_manager = DatabaseManager()
    handler = NymHandler(tconf, data_manager)
    state = PruningState(KeyValueStorageInMemory())
    data_manager.register_new_database(handler.ledger_id, FakeSomething(),
                                       state)
    return handler
示例#2
0
def nym_handler(tconf):
    data_manager = DatabaseManager()
    handler = NymHandler(tconf, data_manager)
    state = State()
    state.txn_list = {}
    state.get = lambda key, isCommitted: state.txn_list.get(key, None)
    state.set = lambda key, value: state.txn_list.update({key: value})
    data_manager.register_new_database(handler.ledger_id, FakeSomething(),
                                       state)
    return handler
示例#3
0
 def register_domain_req_handlers(self):
     nym_handler = NymHandler(self.node.config, self.node.db_manager)
     self.node.write_manager.register_req_handler(nym_handler)