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
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
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)