Based on BUTXO Programming Language
Revision | 86dbf383a394dbd95a54ce9b7e3d1e3a47f1e30b (tree) |
---|---|
Time | 2019-09-17 11:46:56 |
Author | oysheng <33340252+oysheng@user...> |
Commiter | Paladz |
delete amount checking for unlock statement (#37)
@@ -414,7 +414,7 @@ func typeCheckStatement(stat statement, contractValue ValueInfo, clauseName stri | ||
414 | 414 | if t := stmt.unlockedAsset.typ(env); t != assetType { |
415 | 415 | return fmt.Errorf("unlockedAsset expression \"%s\" in unlock statement of clause \"%s\" has type \"%s\", must be Asset", stmt.unlockedAsset, clauseName, t) |
416 | 416 | } |
417 | - if stmt.unlockedAmount.String() != contractValue.Amount || stmt.unlockedAsset.String() != contractValue.Asset { | |
417 | + if stmt.unlockedAsset.String() != contractValue.Asset { | |
418 | 418 | return fmt.Errorf("amount \"%s\" of asset \"%s\" expression in unlock statement of clause \"%s\" must be the contract valueAmount \"%s\" of valueAsset \"%s\"", |
419 | 419 | stmt.unlockedAmount.String(), stmt.unlockedAsset.String(), clauseName, contractValue.Amount, contractValue.Asset) |
420 | 420 | } |