OSDN Git Service

modify get asset
authoroys <oys@oysdeMBP.localdomain>
Wed, 3 Jul 2019 07:08:51 +0000 (15:08 +0800)
committeroys <oys@oysdeMBP.localdomain>
Wed, 3 Jul 2019 07:08:51 +0000 (15:08 +0800)
protocol/bc/types/map.go

index 0252e39..3f14391 100644 (file)
@@ -113,10 +113,9 @@ func mapTx(tx *TxData) (headerID bc.Hash, hdr *bc.TxHeader, entryMap map[bc.Hash
                        coinbase = bc.NewCoinbase(inp.Arbitrary)
                        coinbaseID := addEntry(coinbase)
                        totalAmount := uint64(0)
-                       var asset *bc.AssetID
+                       asset := consensus.BTMAssetID
                        for _, out := range tx.Outputs {
                                totalAmount += out.AssetAmount().Amount
-                               asset = out.AssetAmount().AssetId
                        }
                        muxSources[i] = &bc.ValueSource{
                                Ref: &coinbaseID,