From 9517d9fe7798b726d4ba296e0d363a10d2b7d3b2 Mon Sep 17 00:00:00 2001 From: Sergey Nazarov Date: Wed, 12 Aug 2020 17:48:31 +0300 Subject: [PATCH] Disable this in dApps invoked by address in testnet --- .../diffs/invoke/InvokeScriptTransactionDiff.scala | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/node/src/main/scala/com/wavesplatform/state/diffs/invoke/InvokeScriptTransactionDiff.scala b/node/src/main/scala/com/wavesplatform/state/diffs/invoke/InvokeScriptTransactionDiff.scala index ce3dfcd154e..c165c06a1d0 100644 --- a/node/src/main/scala/com/wavesplatform/state/diffs/invoke/InvokeScriptTransactionDiff.scala +++ b/node/src/main/scala/com/wavesplatform/state/diffs/invoke/InvokeScriptTransactionDiff.scala @@ -100,6 +100,16 @@ object InvokeScriptTransactionDiff { tx.feeAssetId.compatId ) val height = blockchain.height + + val disableThisWhenCalledByAlias = tx.dAppAddressOrAlias match { + case _: Alias => + AddressScheme.current.chainId == 'T'.toByte && + !blockchain.isFeatureActivated(BlockchainFeatures.BlockV5) && + blockchain.height > 1100000 + + case _ => false + } + val environment = new WavesEnvironment( AddressScheme.current.chainId, Coeval.evalOnce(input), @@ -108,7 +118,7 @@ object InvokeScriptTransactionDiff { tthis, directives, tx.id(), - !blockchain.isFeatureActivated(BlockchainFeatures.BlockV5, height) && tx.dAppAddressOrAlias.isInstanceOf[Alias] + disableThisWhenCalledByAlias ) //to avoid continuations when evaluating underestimated by EstimatorV2 scripts