Fix network param hash check for enclave + re-issuance

This commit is contained in:
vanjatomic 2022-04-06 16:08:35 +01:00
parent d74289f90b
commit fd45b11c5c
2 changed files with 2 additions and 3 deletions

View File

@ -2,7 +2,7 @@
# because some versions here need to be matched by app authors in
# their own projects. So don't get fancy with syntax!
cordaVersion=4.8.5.21-CONCLAVE-SNAPSHOT
cordaVersion=4.8.5.22-CONCLAVE-SNAPSHOT
versionSuffix=
gradlePluginsVersion=5.0.12
kotlinVersion=1.2.71

View File

@ -198,8 +198,7 @@ constructor(val txBits: SerializedBytes<CoreTransaction>, override val sigs: Lis
val groupedInputsAndRefs = (inputs + references).groupBy { it.txhash }
groupedInputsAndRefs.map { entry ->
val tx = services.validatedTransactions.getTransaction(entry.key)?.coreTransaction
?: throw TransactionResolutionException(id)
val paramHash = tx.networkParametersHash ?: services.networkParametersService.defaultHash
val paramHash = tx?.networkParametersHash ?: services.networkParametersService.defaultHash
val params = services.networkParametersService.lookup(paramHash) ?: throw TransactionResolutionException(id)
if (txNetworkParameters.epoch < params.epoch)
throw TransactionVerificationException.TransactionNetworkParameterOrderingException(id, entry.value.first(), txNetworkParameters, params)