def do_post_node_creation(): # Integrate plugin into each node. PLUGIN_CLIENT_REQUEST_FIELDS.update(CLIENT_REQUEST_FIELDS) def _post_node_creation(node): enable_token(node) enable_fees(node) return _post_node_creation
def two_requests(looper, sdk_wallet_steward): wh, did = sdk_wallet_steward op = {TXN_TYPE: AUCTION_START, DATA: {'id': 'xyz'}} req1 = sdk_gen_request(op, protocol_version=CURRENT_PROTOCOL_VERSION, identifier=did).as_dict field = list(PLUGIN_CLIENT_REQUEST_FIELDS.keys())[0] req1[field] = 'x' * 10 req2 = copy.deepcopy(req1) req2[field] = 'z' * 10 req1 = sdk_multisign_request_object(looper, sdk_wallet_steward, json.dumps(req1)) req_obj1 = Request(**json.loads(req1)) req2 = sdk_multisign_request_object(looper, sdk_wallet_steward, json.dumps(req2)) req_obj2 = Request(**json.loads(req2)) assert req_obj1.payload_digest == req_obj2.payload_digest assert req_obj1.digest != req_obj2.digest return req1, req2
def __init__(self, operation_schema_is_strict, *args, **kwargs): super().__init__(*args, **kwargs) # Following code is for support of non-strict schema # TODO: refactor this # TODO: this (and all related functionality) can be removed when # when fixed problem with transaction serialization (INDY-338) # Adding fields from enabled plugins to schema. self.schema = self.schema + tuple(PLUGIN_CLIENT_REQUEST_FIELDS.items()) if operation_schema_is_strict: operation_field_index = 2 op = ClientOperationField(schema_is_strict=operation_schema_is_strict) schema = list(self.schema) schema[operation_field_index] = (OPERATION, op) self.schema = tuple(schema)