OSDN Git Service

fix(bc): fix TxInput.SpentOutputID() (#242)
authorHAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
Fri, 5 Jul 2019 03:03:30 +0000 (11:03 +0800)
committerPaladz <yzhu101@uottawa.ca>
Fri, 5 Jul 2019 03:03:30 +0000 (11:03 +0800)
* fix input.SpentOutputID

* refine code

protocol/bc/types/txinput.go

index 88b3bce..d1eeb57 100644 (file)
@@ -136,7 +136,7 @@ func (t *TxInput) SpentOutputID() (o bc.Hash, err error) {
                o, err = ComputeOutputID(&inp.SpendCommitment, VetoInputType, inp.Vote)
        }
 
-       return o, fmt.Errorf("output don't have spend output ID")
+       return o, err
 }
 
 func (t *TxInput) readFrom(r *blockchain.Reader) (err error) {