chainntnfs/interface: fix incorrect statuses for deserialization errors
This commit is contained in:
1 file changed
+2
-2
@@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user