diff --git a/src/test/scala/org/ergoplatform/modifiers/mempool/ErgoTransactionSpec.scala b/src/test/scala/org/ergoplatform/modifiers/mempool/ErgoTransactionSpec.scala index 893f05c723..01535eb5fc 100644 --- a/src/test/scala/org/ergoplatform/modifiers/mempool/ErgoTransactionSpec.scala +++ b/src/test/scala/org/ergoplatform/modifiers/mempool/ErgoTransactionSpec.scala @@ -323,6 +323,9 @@ class ErgoTransactionSpec extends ErgoPropertyTest with ErgoTestConstants { } property("transaction with too many inputs should be rejected") { + // stress-test https://github.com/ergoplatform/ergo/issues/2095 + for (iii <- 1 to 50) { + //we assume that verifier must finish verification of any script in less time than 250K hash calculations // (for the Blake2b256 hash function over a single block input) @@ -366,8 +369,10 @@ class ErgoTransactionSpec extends ErgoPropertyTest with ErgoTestConstants { val (_, time) = BenchmarkUtil.measureTime( tx.statefulValidity(from, IndexedSeq(), sc)(verifier) ) + printf("%d: %d > %d (Timeout/2)\n", iii, time, Timeout/2) + assert(time > Timeout/2) + } // test-loop - assert(time > Timeout) } property("transaction cost") {