Skip to content

Commit

Permalink
Disable this in dApps invoked by address in testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Nazarov committed Aug 12, 2020
1 parent 489e221 commit 9517d9f
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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
Expand Down

0 comments on commit 9517d9f

Please sign in to comment.