OSDN Git Service

fix bug
authormars <mars@bytom.io>
Thu, 20 Jun 2019 03:17:10 +0000 (11:17 +0800)
committermars <mars@bytom.io>
Thu, 20 Jun 2019 03:17:10 +0000 (11:17 +0800)
blockchain/txbuilder/actions.go

index f06c3ed..1ca9379 100644 (file)
@@ -305,7 +305,7 @@ func (c *crossInAction) checkAssetID() error {
        defHash := bc.NewHash(sha3.Sum256(c.RawDefinitionByte))
        assetID := bc.ComputeAssetID(c.IssuanceProgram, c.VMVersion, &defHash)
 
-       if *c.AssetId == *consensus.BTMAssetID && assetID != *c.AssetAmount.AssetId {
+       if *c.AssetId != *consensus.BTMAssetID && assetID != *c.AssetAmount.AssetId {
                return errors.New("incorrect asset_idincorrect asset_id")
        }