Skip to content

Commit 5158a1e

Browse files
committed
Nits from ryanofsky. To squash
1 parent 66b4192 commit 5158a1e

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

qa/rpc-tests/bumpfee.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def test_bumpfee_with_descendant_fails(rbf_node, rbf_node_address, dest_address)
159159
tx = rbf_node.createrawtransaction([{"txid": parent_id, "vout": 0}], {dest_address: 0.00020000})
160160
tx = rbf_node.signrawtransaction(tx)
161161
txid = rbf_node.sendrawtransaction(tx["hex"])
162-
assert_raises_jsonrpc(-4, "Transaction has descendants in the wallet", rbf_node.bumpfee, parent_id)
162+
assert_raises_jsonrpc(-8, "Transaction has descendants in the wallet", rbf_node.bumpfee, parent_id)
163163

164164

165165
def test_small_output_fails(rbf_node, dest_address):

qa/rpc-tests/importprunedfunds.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def run_test(self):
107107
assert_equal(address_info['ismine'], True)
108108

109109
#Remove transactions
110-
assert_raises_jsonrpc(-4, "does not exist", self.nodes[1].removeprunedfunds, txnid1)
110+
assert_raises_jsonrpc(-8, "Transaction does not exist in wallet.", self.nodes[1].removeprunedfunds, txnid1)
111111

112112
balance1 = self.nodes[1].getbalance("*", 0, True)
113113
assert_equal(balance1, Decimal('0.075'))

src/wallet/rpcdump.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ UniValue removeprunedfunds(const JSONRPCRequest& request)
354354
}
355355

356356
if(vHashOut.empty()) {
357-
throw JSONRPCError(RPC_WALLET_ERROR, "Transaction does not exist in wallet.");
357+
throw JSONRPCError(RPC_INVALID_PARAMETER, "Transaction does not exist in wallet.");
358358
}
359359

360360
return NullUniValue;

src/wallet/rpcwallet.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2862,14 +2862,14 @@ UniValue bumpfee(const JSONRPCRequest& request)
28622862
CWalletTx& wtx = pwallet->mapWallet[hash];
28632863

28642864
if (pwallet->HasWalletSpend(hash)) {
2865-
throw JSONRPCError(RPC_WALLET_ERROR, "Transaction has descendants in the wallet");
2865+
throw JSONRPCError(RPC_INVALID_PARAMETER, "Transaction has descendants in the wallet");
28662866
}
28672867

28682868
{
28692869
LOCK(mempool.cs);
28702870
auto it = mempool.mapTx.find(hash);
28712871
if (it != mempool.mapTx.end() && it->GetCountWithDescendants() > 1) {
2872-
throw JSONRPCError(RPC_WALLET_ERROR, "Transaction has descendants in the mempool");
2872+
throw JSONRPCError(RPC_INVALID_PARAMETER, "Transaction has descendants in the mempool");
28732873
}
28742874
}
28752875

0 commit comments

Comments
 (0)