From fca9f3d90b6790b6cb26faa04aa2b5d8bd71c91d Mon Sep 17 00:00:00 2001 From: Remy Date: Mon, 20 Jul 2020 17:50:59 +0200 Subject: [PATCH] DAML-LF: unset the field NodeFecth#value_version in transaction.proto (#6784) According transaction specification the field `value_version` "is optional; if defined, it must be a version ofthe value specification, and `template_id` shall be consumed according to that version. Otherwise, it is assumed to be version 1." We take advantage that the encoding of identifier in value does not change since version "1" to unset the field `value_version`, hence using the default interpretation. CHANGELOG_BEGIN CHANGELOG_END --- .../digitalasset/daml/lf/transaction/TransactionCoder.scala | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/daml-lf/transaction/src/main/scala/com/digitalasset/daml/lf/transaction/TransactionCoder.scala b/daml-lf/transaction/src/main/scala/com/digitalasset/daml/lf/transaction/TransactionCoder.scala index 6a35f385217..5d18b1af393 100644 --- a/daml-lf/transaction/src/main/scala/com/digitalasset/daml/lf/transaction/TransactionCoder.scala +++ b/daml-lf/transaction/src/main/scala/com/digitalasset/daml/lf/transaction/TransactionCoder.scala @@ -186,14 +186,13 @@ object TransactionCoder { } case nf @ NodeFetch(_, _, _, _, _, _, _) => - val (vversion, etid) = ValueCoder.encodeIdentifier( + val (_, etid) = ValueCoder.encodeIdentifier( nf.templateId, valueVersion1Only(transactionVersion) option ValueVersion("1"), ) val fetchBuilder = TransactionOuterClass.NodeFetch .newBuilder() .setTemplateId(etid) - .setValueVersion(vversion.protoValue) .addAllStakeholders(nf.stakeholders.toSet[String].asJava) .addAllSignatories(nf.signatories.toSet[String].asJava)