From: oysheng <33340252+oysheng@users.noreply.github.com> Date: Tue, 17 Sep 2019 02:46:56 +0000 (+0800) Subject: delete amount checking for unlock statement (#37) X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=refs%2Fheads%2Fmaster;p=bytom%2Fequity.git delete amount checking for unlock statement (#37) --- 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) }