diff options
-rw-r--r-- | src/daemon/command_parser_executor.cpp | 2 | ||||
-rw-r--r-- | tests/unit_tests/hardfork.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/daemon/command_parser_executor.cpp b/src/daemon/command_parser_executor.cpp index 856cf6460..d1d48b6da 100644 --- a/src/daemon/command_parser_executor.cpp +++ b/src/daemon/command_parser_executor.cpp @@ -405,7 +405,7 @@ bool t_command_parser_executor::ban(const std::vector<std::string>& args) time_t seconds = P2P_IP_BLOCKTIME; if (args.size() > 1) { - seconds = std::stoi(args[0]); + seconds = std::stoi(args[1]); if (seconds == 0) { return false; diff --git a/tests/unit_tests/hardfork.cpp b/tests/unit_tests/hardfork.cpp index 612eb8307..56ec155f0 100644 --- a/tests/unit_tests/hardfork.cpp +++ b/tests/unit_tests/hardfork.cpp @@ -42,10 +42,11 @@ using namespace cryptonote; class TestDB: public BlockchainDB { public: - virtual void open(const std::string& filename, const int db_flags = 0) { + TestDB() { for (size_t n = 0; n < 256; ++n) starting_height[n] = std::numeric_limits<uint64_t>::max(); } + virtual void open(const std::string& filename, const int db_flags = 0) { } virtual void close() {} virtual void sync() {} virtual void reset() {} |