chainntnfs/interface: fix incorrect statuses for deserialization errors

This commit is contained in:
Conner Fromknecht 2019-06-27 19:10:10 -07:00
parent 91a44c001c
commit 922a980bd7
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7

@ -662,13 +662,13 @@ func ConfDetailsFromTxIndex(chainConn TxIndexConn, txid *chainhash.Hash,
// confirmation details.
rawTx, err := hex.DecodeString(rawTxRes.Hex)
if err != nil {
return nil, TxFoundIndex,
return nil, TxNotFoundIndex,
fmt.Errorf("unable to deserialize tx %v: %v",
txHash, err)
}
var tx wire.MsgTx
if err := tx.Deserialize(bytes.NewReader(rawTx)); err != nil {
return nil, TxFoundIndex,
return nil, TxNotFoundIndex,
fmt.Errorf("unable to deserialize tx %v: %v",
txHash, err)
}