• R/O
  • HTTP
  • SSH
  • HTTPS

equity: Commit

Based on BUTXO Programming Language


Commit MetaInfo

Revision86dbf383a394dbd95a54ce9b7e3d1e3a47f1e30b (tree)
Time2019-09-17 11:46:56
Authoroysheng <33340252+oysheng@user...>
CommiterPaladz

Log Message

delete amount checking for unlock statement (#37)

Change Summary

Incremental Difference

--- a/compiler/checks.go
+++ b/compiler/checks.go
@@ -414,7 +414,7 @@ func typeCheckStatement(stat statement, contractValue ValueInfo, clauseName stri
414414 if t := stmt.unlockedAsset.typ(env); t != assetType {
415415 return fmt.Errorf("unlockedAsset expression \"%s\" in unlock statement of clause \"%s\" has type \"%s\", must be Asset", stmt.unlockedAsset, clauseName, t)
416416 }
417- if stmt.unlockedAmount.String() != contractValue.Amount || stmt.unlockedAsset.String() != contractValue.Asset {
417+ if stmt.unlockedAsset.String() != contractValue.Asset {
418418 return fmt.Errorf("amount \"%s\" of asset \"%s\" expression in unlock statement of clause \"%s\" must be the contract valueAmount \"%s\" of valueAsset \"%s\"",
419419 stmt.unlockedAmount.String(), stmt.unlockedAsset.String(), clauseName, contractValue.Amount, contractValue.Asset)
420420 }
Show on old repository browser