OSDN Git Service

fix add order bug
[bytom/vapor.git] / wallet / indexer.go
index 0cf4a32..d0055d4 100644 (file)
@@ -8,13 +8,13 @@ import (
 
        log "github.com/sirupsen/logrus"
 
-       "github.com/vapor/account"
-       "github.com/vapor/blockchain/query"
-       "github.com/vapor/consensus"
-       "github.com/vapor/crypto/sha3pool"
-       chainjson "github.com/vapor/encoding/json"
-       "github.com/vapor/protocol/bc"
-       "github.com/vapor/protocol/bc/types"
+       "github.com/bytom/vapor/account"
+       "github.com/bytom/vapor/blockchain/query"
+       "github.com/bytom/vapor/consensus"
+       "github.com/bytom/vapor/crypto/sha3pool"
+       chainjson "github.com/bytom/vapor/encoding/json"
+       "github.com/bytom/vapor/protocol/bc"
+       "github.com/bytom/vapor/protocol/bc/types"
 )
 
 func parseGlobalTxIdx(globalTxIdx []byte) (*bc.Hash, uint64) {
@@ -34,6 +34,9 @@ func saveExternalAssetDefinition(b *types.Block, store WalletStore) error {
        for _, tx := range b.Transactions {
                for _, orig := range tx.Inputs {
                        if cci, ok := orig.TypedInput.(*types.CrossChainInput); ok {
+                               if cci.AssetId.String() == consensus.BTMAssetID.String() {
+                                       continue
+                               }
                                assetID := cci.AssetId
                                if _, err := newStore.GetAsset(assetID); err == nil {
                                        continue