aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGavin Andresen <[email protected]>2010-09-10 19:18:27 -0400
committerGavin Andresen <[email protected]>2010-09-10 19:18:27 -0400
commit41016bfc46b70aace013ffd29143a27bc7288e48 (patch)
tree8fcae7025857db7b02e5911a42ad334d7a07f972
parentMerge remote branch 'refs/remotes/svn/trunk' into svn (diff)
parentfix build on non-intel architectures, thanks teknohog (diff)
downloaddiscoin-41016bfc46b70aace013ffd29143a27bc7288e48.tar.xz
discoin-41016bfc46b70aace013ffd29143a27bc7288e48.zip
Merge remote branch 'refs/remotes/svn/trunk' into svn
-rw-r--r--main.cpp11
-rw-r--r--serialize.h2
-rw-r--r--ui.cpp2
3 files changed, 8 insertions, 7 deletions
diff --git a/main.cpp b/main.cpp
index e3c44145d..8d2fdde0e 100644
--- a/main.cpp
+++ b/main.cpp
@@ -2767,15 +2767,15 @@ inline void SHA256Transform(void* pstate, void* pinput, const void* pinit)
static const int NPAR = 32;
extern void Double_BlockSHA256(const void* pin, void* pout, const void* pinit, unsigned int hash[8][NPAR], const void* init2);
-#ifdef __GNUC__
+#if defined(__GNUC__) && defined(CRYPTOPP_X86_ASM_AVAILABLE)
void CallCPUID(int in, int& aret, int& cret)
{
int a, c;
asm (
"mov %2, %%eax; " // in into eax
"cpuid;"
- "mov %%eax, %0;" // eax into ret
- "mov %%ecx, %1;" // eax into ret
+ "mov %%eax, %0;" // eax into a
+ "mov %%ecx, %1;" // eax into c
:"=r"(a),"=r"(c) /* output */
:"r"(in) /* input */
:"%eax","%ecx" /* clobbered register */
@@ -3311,7 +3311,8 @@ bool CreateTransaction(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, CK
wtxNew.vout.push_back(CTxOut(nValueOut, scriptPubKey));
// Fill a vout back to self with any change
- if (nValueIn > nTotalValue)
+ int64 nChange = nValueIn - nTotalValue;
+ if (nChange >= CENT)
{
// Note: We use a new key here to keep it from being obvious which side is the change.
// The drawback is that by not reusing a previous key, the change may be lost if a
@@ -3330,7 +3331,7 @@ bool CreateTransaction(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, CK
scriptChange.SetBitcoinAddress(keyRet.GetPubKey());
else
scriptChange << keyRet.GetPubKey() << OP_CHECKSIG;
- wtxNew.vout.push_back(CTxOut(nValueIn - nTotalValue, scriptChange));
+ wtxNew.vout.push_back(CTxOut(nChange, scriptChange));
}
// Fill a vout to the payee
diff --git a/serialize.h b/serialize.h
index 2b88d3536..712d6c530 100644
--- a/serialize.h
+++ b/serialize.h
@@ -23,7 +23,7 @@ class CAutoFile;
static const unsigned int MAX_SIZE = 0x02000000;
static const int VERSION = 312;
-static const char* pszSubVer = ".2";
+static const char* pszSubVer = ".3";
diff --git a/ui.cpp b/ui.cpp
index 4d4e8463b..7916f6775 100644
--- a/ui.cpp
+++ b/ui.cpp
@@ -184,7 +184,7 @@ int ThreadSafeMessageBox(const string& message, const string& caption, int style
bool ThreadSafeAskFee(int64 nFeeRequired, const string& strCaption, wxWindow* parent)
{
- if (nFeeRequired == 0 || fDaemon)
+ if (nFeeRequired < CENT || fDaemon)
return true;
string strMessage = strprintf(
_("This transaction is over the size limit. You can still send it for a fee of %s, "