aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/README_osx.txt8
-rw-r--r--doc/build-osx.md7
-rw-r--r--qa/rpc-tests/util.py16
-rw-r--r--src/qt/bitcoinamountfield.cpp1
-rw-r--r--src/rpcmining.cpp30
5 files changed, 34 insertions, 28 deletions
diff --git a/doc/README_osx.txt b/doc/README_osx.txt
index 2be56c1592..8831649bd8 100644
--- a/doc/README_osx.txt
+++ b/doc/README_osx.txt
@@ -20,14 +20,6 @@ https://github.com/mingwandroid/toolchain4
In order to build a working toolchain, the following source packages are needed
from Apple: cctools, dyld, and ld64.
-Beware. This part is ugly. Very very very ugly. In the future, this should be
-broken out into a new repository and cleaned up. Additionally, the binaries
-only work when built as x86 and not x86_64. This is an especially nasty
-limitation because it must be linked with the toolchain's libLTO.so, meaning
-that the entire toolchain must be x86. Gitian x86_64 should not be used until
-this has been fixed, because it would mean that several native dependencies
-(openssl, libuuid, etc) would need to be built as x86 first.
-
These tools inject timestamps by default, which produce non-deterministic
binaries. The ZERO_AR_DATE environment variable is used to disable that.
diff --git a/doc/build-osx.md b/doc/build-osx.md
index dc55f8259e..c79c1317b0 100644
--- a/doc/build-osx.md
+++ b/doc/build-osx.md
@@ -5,8 +5,7 @@ This guide will show you how to build bitcoind(headless client) for OSX.
Notes
-----
-* Tested on OS X 10.6 through 10.9 on 64-bit Intel processors only.
-Older OSX releases or 32-bit processors are no longer supported.
+* Tested on OS X 10.7 through 10.10 on 64-bit Intel processors only.
* All of the commands should be executed in a Terminal application. The
built-in one is located in `/Applications/Utilities`.
@@ -96,9 +95,9 @@ as follows for maximum compatibility:
All dependencies should be compiled with these flags:
- -mmacosx-version-min=10.6
+ -mmacosx-version-min=10.7
-arch x86_64
- -isysroot $(xcode-select --print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk
+ -isysroot $(xcode-select --print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
Once dependencies are compiled, see release-process.md for how the Bitcoin-Qt.app
bundle is packaged and signed to create the .dmg disk image that is distributed.
diff --git a/qa/rpc-tests/util.py b/qa/rpc-tests/util.py
index e5383b6c57..0d5eeefa79 100644
--- a/qa/rpc-tests/util.py
+++ b/qa/rpc-tests/util.py
@@ -61,8 +61,8 @@ def sync_mempools(rpc_connections):
bitcoind_processes = {}
-def initialize_datadir(dir, n):
- datadir = os.path.join(dir, "node"+str(n))
+def initialize_datadir(dirname, n):
+ datadir = os.path.join(dirname, "node"+str(n))
if not os.path.isdir(datadir):
os.makedirs(datadir)
with open(os.path.join(datadir, "bitcoin.conf"), 'w') as f:
@@ -145,11 +145,11 @@ def _rpchost_to_args(rpchost):
rv += ['-rpcport=' + rpcport]
return rv
-def start_node(i, dir, extra_args=None, rpchost=None):
+def start_node(i, dirname, extra_args=None, rpchost=None):
"""
Start a bitcoind and return RPC connection to it
"""
- datadir = os.path.join(dir, "node"+str(i))
+ datadir = os.path.join(dirname, "node"+str(i))
args = [ os.getenv("BITCOIND", "bitcoind"), "-datadir="+datadir, "-keypool=1", "-discover=0" ]
if extra_args is not None: args.extend(extra_args)
bitcoind_processes[i] = subprocess.Popen(args)
@@ -163,15 +163,15 @@ def start_node(i, dir, extra_args=None, rpchost=None):
proxy.url = url # store URL on proxy for info
return proxy
-def start_nodes(num_nodes, dir, extra_args=None, rpchost=None):
+def start_nodes(num_nodes, dirname, extra_args=None, rpchost=None):
"""
Start multiple bitcoinds, return RPC connections to them
"""
if extra_args is None: extra_args = [ None for i in range(num_nodes) ]
- return [ start_node(i, dir, extra_args[i], rpchost) for i in range(num_nodes) ]
+ return [ start_node(i, dirname, extra_args[i], rpchost) for i in range(num_nodes) ]
-def log_filename(dir, n_node, logname):
- return os.path.join(dir, "node"+str(n_node), "regtest", logname)
+def log_filename(dirname, n_node, logname):
+ return os.path.join(dirname, "node"+str(n_node), "regtest", logname)
def stop_node(node, i):
node.stop()
diff --git a/src/qt/bitcoinamountfield.cpp b/src/qt/bitcoinamountfield.cpp
index 6e35bf17b3..2c100337d2 100644
--- a/src/qt/bitcoinamountfield.cpp
+++ b/src/qt/bitcoinamountfield.cpp
@@ -130,6 +130,7 @@ public:
extra += hint - style()->subControlRect(QStyle::CC_SpinBox, &opt,
QStyle::SC_SpinBoxEditField, this).size();
hint += extra;
+ hint.setHeight(h);
opt.rect = rect();
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 879a504115..2bde02c0a1 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -121,6 +121,8 @@ Value setgenerate(const Array& params, bool fHelp)
"1. generate (boolean, required) Set to true to turn on generation, off to turn off.\n"
"2. genproclimit (numeric, optional) Set the processor limit for when generation is on. Can be -1 for unlimited.\n"
" Note: in -regtest mode, genproclimit controls how many blocks are generated immediately.\n"
+ "\nResult\n"
+ "[ blockhashes ] (array, -regtest only) hashes of blocks generated\n"
"\nExamples:\n"
"\nSet the generation on with a limit of one processor\n"
+ HelpExampleCli("setgenerate", "true 1") +
@@ -154,26 +156,38 @@ Value setgenerate(const Array& params, bool fHelp)
int nHeightEnd = 0;
int nHeight = 0;
int nGenerate = (nGenProcLimit > 0 ? nGenProcLimit : 1);
+ CReserveKey reservekey(pwalletMain);
+
{ // Don't keep cs_main locked
LOCK(cs_main);
nHeightStart = chainActive.Height();
nHeight = nHeightStart;
nHeightEnd = nHeightStart+nGenerate;
}
- int nHeightLast = -1;
+ unsigned int nExtraNonce = 0;
+ Array blockHashes;
while (nHeight < nHeightEnd)
{
- if (nHeightLast != nHeight)
+ auto_ptr<CBlockTemplate> pblocktemplate(CreateNewBlockWithKey(reservekey));
+ if (!pblocktemplate.get())
+ throw JSONRPCError(RPC_INTERNAL_ERROR, "Wallet keypool empty");
+ CBlock *pblock = &pblocktemplate->block;
{
- nHeightLast = nHeight;
- GenerateBitcoins(fGenerate, pwalletMain, 1);
- }
- MilliSleep(1);
- { // Don't keep cs_main locked
LOCK(cs_main);
- nHeight = chainActive.Height();
+ IncrementExtraNonce(pblock, chainActive.Tip(), nExtraNonce);
+ }
+ while (!CheckProofOfWork(pblock->GetHash(), pblock->nBits)) {
+ // Yes, there is a chance every nonce could fail to satisfy the -regtest
+ // target -- 1 in 2^(2^32). That ain't gonna happen.
+ ++pblock->nNonce;
}
+ CValidationState state;
+ if (!ProcessNewBlock(state, NULL, pblock))
+ throw JSONRPCError(RPC_INTERNAL_ERROR, "ProcessNewBlock, block not accepted");
+ ++nHeight;
+ blockHashes.push_back(pblock->GetHash().GetHex());
}
+ return blockHashes;
}
else // Not -regtest: start generate thread, return immediately
{