mirror of
https://github.com/corda/corda.git
synced 2025-02-20 09:26:41 +00:00
CORDA-2187 & CORDA-2038: reverting maxTransactionSize <= maxMessageSize (#4166)
* CORDA-2187 reverting maxTransactionSize <= maxMessageSize * Addressing review comments * Increasing the maxTransactionSize for the Bootstrapper * Updating the testNetworkParameters
This commit is contained in:
parent
c205a10ec0
commit
6f005605aa
@ -86,7 +86,6 @@ data class NetworkParameters(
|
||||
require(epoch > 0) { "epoch must be at least 1" }
|
||||
require(maxMessageSize > 0) { "maxMessageSize must be at least 1" }
|
||||
require(maxTransactionSize > 0) { "maxTransactionSize must be at least 1" }
|
||||
require(maxTransactionSize <= maxMessageSize) { "maxTransactionSize cannot be bigger than maxMessageSize" }
|
||||
require(!eventHorizon.isNegative) { "eventHorizon must be positive value" }
|
||||
require(noOverlap(packageOwnership.keys)) { "multiple packages added to the packageOwnership overlap." }
|
||||
}
|
||||
|
@ -394,7 +394,7 @@ internal constructor(private val initSerEnv: Boolean,
|
||||
notaries = notaryInfos,
|
||||
modifiedTime = Instant.now(),
|
||||
maxMessageSize = 10485760,
|
||||
maxTransactionSize = 10485760,
|
||||
maxTransactionSize = 524288000,
|
||||
whitelistedContractImplementations = whitelist,
|
||||
packageOwnership = packageOwnership.filterNotNullValues(),
|
||||
epoch = 1,
|
||||
|
@ -76,19 +76,6 @@ class NetworkParametersTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `maxTransactionSize must be bigger than maxMesssageSize`() {
|
||||
assertThatExceptionOfType(IllegalArgumentException::class.java).isThrownBy {
|
||||
NetworkParameters(1,
|
||||
emptyList(),
|
||||
2000,
|
||||
2001,
|
||||
Instant.now(),
|
||||
1,
|
||||
emptyMap())
|
||||
}.withMessage("maxTransactionSize cannot be bigger than maxMessageSize")
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `package ownership checks are correct`() {
|
||||
val key1 = generateKeyPair().public
|
||||
|
@ -13,7 +13,7 @@ fun testNetworkParameters(
|
||||
modifiedTime: Instant = Instant.now(),
|
||||
maxMessageSize: Int = 10485760,
|
||||
// TODO: Make this configurable and consistence across driver, bootstrapper, demobench and NetworkMapServer
|
||||
maxTransactionSize: Int = maxMessageSize,
|
||||
maxTransactionSize: Int = maxMessageSize * 50,
|
||||
whitelistedContractImplementations: Map<String, List<AttachmentId>> = emptyMap(),
|
||||
epoch: Int = 1,
|
||||
eventHorizon: Duration = 30.days
|
||||
|
Loading…
x
Reference in New Issue
Block a user