+ for _, mainchainOutputID := range tx.MainchainOutputIDs {
+ utxoEntry, _ := ctx.Store.GetUtxo(&mainchainOutputID)
+ if utxoEntry == nil {
+ continue
+ }
+ if utxoEntry.Type != storage.CrosschainUTXOType {
+ return fmt.Errorf("found non-mainchain utxo entry")
+ }
+ if !utxoEntry.Spent {
+ return fmt.Errorf("utxo entry status should be spent")
+ }
+ }
+