Pause mining during joinsplit creation
This commit is contained in:
committed by
Jay Graber
parent
5a0d9db4e4
commit
49c2cecb9f
@@ -21,6 +21,7 @@
|
|||||||
#include "rpcprotocol.h"
|
#include "rpcprotocol.h"
|
||||||
#include "zcash/IncrementalMerkleTree.hpp"
|
#include "zcash/IncrementalMerkleTree.hpp"
|
||||||
#include "sodium.h"
|
#include "sodium.h"
|
||||||
|
#include "miner.h"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
@@ -101,6 +102,14 @@ void AsyncRPCOperation_sendmany::main() {
|
|||||||
|
|
||||||
bool success = false;
|
bool success = false;
|
||||||
|
|
||||||
|
#ifdef ENABLE_MINING
|
||||||
|
#ifdef ENABLE_WALLET
|
||||||
|
GenerateBitcoins(false, NULL, 0);
|
||||||
|
#else
|
||||||
|
GenerateBitcoins(false, 0);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
try {
|
try {
|
||||||
success = main_impl();
|
success = main_impl();
|
||||||
} catch (Object objError) {
|
} catch (Object objError) {
|
||||||
@@ -119,6 +128,14 @@ void AsyncRPCOperation_sendmany::main() {
|
|||||||
set_error_message("unknown error");
|
set_error_message("unknown error");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ENABLE_MINING
|
||||||
|
#ifdef ENABLE_WALLET
|
||||||
|
GenerateBitcoins(GetBoolArg("-gen",false), pwalletMain, GetArg("-genproclimit", 1));
|
||||||
|
#else
|
||||||
|
GenerateBitcoins(GetBoolArg("-gen",false), GetArg("-genproclimit", 1));
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
stop_execution_clock();
|
stop_execution_clock();
|
||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
|
|||||||
Reference in New Issue
Block a user