chainntnfs/interface: fix incorrect statuses for deserialization errors
This commit is contained in:
parent
91a44c001c
commit
922a980bd7
@ -662,13 +662,13 @@ func ConfDetailsFromTxIndex(chainConn TxIndexConn, txid *chainhash.Hash,
|
|||||||
// confirmation details.
|
// confirmation details.
|
||||||
rawTx, err := hex.DecodeString(rawTxRes.Hex)
|
rawTx, err := hex.DecodeString(rawTxRes.Hex)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, TxFoundIndex,
|
return nil, TxNotFoundIndex,
|
||||||
fmt.Errorf("unable to deserialize tx %v: %v",
|
fmt.Errorf("unable to deserialize tx %v: %v",
|
||||||
txHash, err)
|
txHash, err)
|
||||||
}
|
}
|
||||||
var tx wire.MsgTx
|
var tx wire.MsgTx
|
||||||
if err := tx.Deserialize(bytes.NewReader(rawTx)); err != nil {
|
if err := tx.Deserialize(bytes.NewReader(rawTx)); err != nil {
|
||||||
return nil, TxFoundIndex,
|
return nil, TxNotFoundIndex,
|
||||||
fmt.Errorf("unable to deserialize tx %v: %v",
|
fmt.Errorf("unable to deserialize tx %v: %v",
|
||||||
txHash, err)
|
txHash, err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user