From 86dbf383a394dbd95a54ce9b7e3d1e3a47f1e30b Mon Sep 17 00:00:00 2001 From: oysheng <33340252+oysheng@users.noreply.github.com> Date: Tue, 17 Sep 2019 10:46:56 +0800 Subject: [PATCH] delete amount checking for unlock statement (#37) --- compiler/checks.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/checks.go b/compiler/checks.go index 0eda118..d8d3a2d 100644 --- a/compiler/checks.go +++ b/compiler/checks.go @@ -414,7 +414,7 @@ func typeCheckStatement(stat statement, contractValue ValueInfo, clauseName stri if t := stmt.unlockedAsset.typ(env); t != assetType { return fmt.Errorf("unlockedAsset expression \"%s\" in unlock statement of clause \"%s\" has type \"%s\", must be Asset", stmt.unlockedAsset, clauseName, t) } - if stmt.unlockedAmount.String() != contractValue.Amount || stmt.unlockedAsset.String() != contractValue.Asset { + if stmt.unlockedAsset.String() != contractValue.Asset { return fmt.Errorf("amount \"%s\" of asset \"%s\" expression in unlock statement of clause \"%s\" must be the contract valueAmount \"%s\" of valueAsset \"%s\"", stmt.unlockedAmount.String(), stmt.unlockedAsset.String(), clauseName, contractValue.Amount, contractValue.Asset) } -- 2.11.0