X-Git-Url: http://git.osdn.net/view?p=bytom%2Fvapor.git;a=blobdiff_plain;f=protocol%2Fbc%2Ftypes%2Fmap.go;h=4a795b5bd83643f8c4ca214850af5c143ec14fe1;hp=8ec616765160fefd0787cf7643b1d41f86e80575;hb=7673e01ba118c9c021aff983f0fbe56ec125d9e3;hpb=754b9dba8dbec3feaca8768363a27a6c8e87242a diff --git a/protocol/bc/types/map.go b/protocol/bc/types/map.go index 8ec61676..4a795b5b 100644 --- a/protocol/bc/types/map.go +++ b/protocol/bc/types/map.go @@ -152,8 +152,13 @@ func mapTx(tx *TxData) (headerID bc.Hash, hdr *bc.TxHeader, entryMap map[bc.Hash // connect the inputs to the mux for _, spend := range spends { - spentOutput := entryMap[*spend.SpentOutputId].(*bc.IntraChainOutput) - spend.SetDestination(&muxID, spentOutput.Source.Value, spend.Ordinal) + switch spentOutput := entryMap[*spend.SpentOutputId].(type) { + case *bc.IntraChainOutput: + spend.SetDestination(&muxID, spentOutput.Source.Value, spend.Ordinal) + + case *bc.VoteOutput: + spend.SetDestination(&muxID, spentOutput.Source.Value, spend.Ordinal) + } } for _, crossIn := range crossIns {