From 9e51db8b823b1c183af5b979725eef4c3fb071b8 Mon Sep 17 00:00:00 2001 From: chriseth Date: Fri, 12 Jun 2015 12:27:32 +0200 Subject: [PATCH] Do not fail if seed cannot be written to file. --- libdevcrypto/Common.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libdevcrypto/Common.cpp b/libdevcrypto/Common.cpp index 6c66a95d6..8567ac12b 100644 --- a/libdevcrypto/Common.cpp +++ b/libdevcrypto/Common.cpp @@ -280,12 +280,12 @@ h256 Nonce::get(bool _commit) BOOST_THROW_EXCEPTION(InvalidState()); // prevent seed reuse if process terminates abnormally - writeFile(s_seedFile, bytes()); + try { writeFile(s_seedFile, bytes()); } catch (FileError const&) {} } h256 prev(s_seed); sha3(prev.ref(), s_seed.ref()); if (_commit) - writeFile(s_seedFile, s_seed.asBytes()); + try { writeFile(s_seedFile, s_seed.asBytes()); } catch (FileError const&) {} return std::move(s_seed); }