From 90f5c576d34ecae475e9c932a3a2d3c16edd724c Mon Sep 17 00:00:00 2001 From: Sergey Kroshnin Date: Tue, 15 Jan 2019 19:15:12 +0300 Subject: [PATCH] Fix RPC wallet_change_seed (#1586) --- nano/core_test/rpc.cpp | 3 ++- nano/node/rpc.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/nano/core_test/rpc.cpp b/nano/core_test/rpc.cpp index fe0e957e..05a0d218 100644 --- a/nano/core_test/rpc.cpp +++ b/nano/core_test/rpc.cpp @@ -2162,9 +2162,10 @@ TEST (rpc, wallet_change_seed) request.put ("wallet", system0.nodes[0]->wallets.items.begin ()->first.to_string ()); request.put ("seed", seed.pub.to_string ()); test_response response (request, rpc, system0.io_ctx); + system0.deadline_set (5s); while (response.status == 0) { - system0.poll (); + ASSERT_NO_ERROR (system0.poll ()); } ASSERT_EQ (200, response.status); { diff --git a/nano/node/rpc.cpp b/nano/node/rpc.cpp index 60dfc7f4..a3593712 100644 --- a/nano/node/rpc.cpp +++ b/nano/node/rpc.cpp @@ -3187,7 +3187,7 @@ void nano::rpc_handler::wallet_change_seed () nano::raw_key seed; if (!seed.data.decode_hex (seed_text)) { - auto count (count_optional_impl ()); + auto count (count_optional_impl (0)); auto transaction (node.store.tx_begin_write ()); if (wallet->store.valid_password (transaction)) {