OSDN Git Service

modify list transtaction v0.1_list_transaction
authormars <mars@bytom.io>
Wed, 12 Jun 2019 10:31:36 +0000 (18:31 +0800)
committermars <mars@bytom.io>
Wed, 12 Jun 2019 10:31:36 +0000 (18:31 +0800)
wallet/annotated.go

index 4bcc507..b47f3fb 100644 (file)
@@ -193,6 +193,9 @@ func (w *Wallet) BuildAnnotatedInput(tx *types.Tx, i uint32) *query.AnnotatedInp
                for _, arg := range arguments {
                        in.WitnessArguments = append(in.WitnessArguments, arg)
                }
+               if _, ok := tx.Entries[*e.SpentOutputId].(*bc.VoteOutput); ok {
+                       in.Type = "cancel_vote"
+               }
 
        case *bc.Coinbase:
                in.Type = "coinbase"