mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-06-07 06:36:46 +00:00
Try to match bitcoind sendrawtransaction RPC errors.
This commit is contained in:
parent
c1a1e6b6b2
commit
b97a2145d8
@ -751,7 +751,7 @@ func handleSendRawTransaction(s *rpcServer, cmd btcjson.Cmd, walletNotification
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
err := btcjson.Error{
|
err := btcjson.Error{
|
||||||
Code: btcjson.ErrDeserialization.Code,
|
Code: btcjson.ErrDeserialization.Code,
|
||||||
Message: "Unable to deserialize raw tx",
|
Message: "TX decode failed",
|
||||||
}
|
}
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -769,13 +769,13 @@ func handleSendRawTransaction(s *rpcServer, cmd btcjson.Cmd, walletNotification
|
|||||||
} else {
|
} else {
|
||||||
log.Errorf("RPCS: Failed to process transaction %v: %v",
|
log.Errorf("RPCS: Failed to process transaction %v: %v",
|
||||||
tx.Sha(), err)
|
tx.Sha(), err)
|
||||||
}
|
|
||||||
err = btcjson.Error{
|
err = btcjson.Error{
|
||||||
Code: btcjson.ErrDeserialization.Code,
|
Code: btcjson.ErrDeserialization.Code,
|
||||||
Message: "Failed to process transaction",
|
Message: "TX rejected",
|
||||||
}
|
}
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// If called from websocket code, add a mined tx hashes
|
// If called from websocket code, add a mined tx hashes
|
||||||
// request.
|
// request.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user