Commit bcde6b3e authored by Infernoman's avatar Infernoman
Browse files

Fix dirty-merge-0.9

Former-commit-id: 66f0baa03b21f972e974b89cd89890568043f2a7
Showing with 46 additions and 70 deletions
+46 -70
......@@ -1666,7 +1666,6 @@ void CheckForkWarningConditions()
std::string warning = std::string("'Warning: Large-work fork detected, forking after block ") +
pindexBestForkBase->phashBlock->ToString() + std::string("'");
CAlert::Notify(warning, true);
}
}
if (pindexBestForkTip && pindexBestForkBase)
{
......@@ -2087,14 +2086,15 @@ bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, C
unsigned int flags = SCRIPT_VERIFY_NOCACHE |
(fStrictPayToScriptHash ? SCRIPT_VERIFY_P2SH : SCRIPT_VERIFY_NONE);
if (considerNames)
flags |= SCRIPT_VERIFY_NAMES;
if (block.nVersion >= 3 &&
if (block.nVersion.GetBaseVersion() >= 3 &&
((!TestNet() && CBlockIndex::IsSuperMajority(3, pindex->pprev, 750, 1000)) ||
(TestNet() && CBlockIndex::IsSuperMajority(3, pindex->pprev, 51, 100)))) {
flags |= SCRIPT_VERIFY_DERSIG;
}
if (considerNames)
flags |= SCRIPT_VERIFY_NAMES;
CBlockUndo blockundo(pindex);
......@@ -2927,7 +2927,7 @@ bool AcceptBlock(CBlock& block, CValidationState& state, CDiskBlockPos* dbp)
}
}
// Reject block.nVersion=2 blocks when 95% (75% on testnet) of the network has upgraded:
if (block.nVersion < 3)
if (block.nVersion.GetBaseVersion() < 3)
{
if ((!TestNet() && CBlockIndex::IsSuperMajority(3, pindexPrev, 950, 1000)) ||
(TestNet() && CBlockIndex::IsSuperMajority(3, pindexPrev, 75, 100)))
......
......@@ -23,7 +23,7 @@
<attribute name="title">
<string>&amp;Information</string>
</attribute>
<layout class="QGridLayout" name="gridLayout" columnstretch="0,0">
<layout class="QGridLayout" name="gridLayout" columnstretch="0,1">
<property name="horizontalSpacing">
<number>12</number>
</property>
......@@ -86,13 +86,6 @@
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_12">
<property name="text">
<string>Build date</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_14">
<property name="text">
......@@ -119,10 +112,10 @@
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_13">
<item row="4" column="0">
<widget class="QLabel" name="label_12">
<property name="text">
<string>Startup time</string>
<string>Build date</string>
</property>
</widget>
</item>
......@@ -142,10 +135,10 @@
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_8">
<item row="5" column="0">
<widget class="QLabel" name="label_13">
<property name="text">
<string>Name</string>
<string>Startup time</string>
</property>
</widget>
</item>
......@@ -178,10 +171,10 @@
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="label_7">
<item row="7" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Number of connections</string>
<string>Name</string>
</property>
</widget>
</item>
......@@ -201,10 +194,10 @@
</property>
</widget>
</item>
<item row="11" column="0">
<widget class="QLabel" name="label_3">
<item row="8" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Current number of blocks</string>
<string>Number of connections</string>
</property>
</widget>
</item>
......@@ -224,7 +217,7 @@
</property>
</widget>
</item>
<item row="10" column="0">
<item row="9" column="0">
<widget class="QLabel" name="label_10">
<property name="font">
<font>
......@@ -237,14 +230,14 @@
</property>
</widget>
</item>
<item row="12" column="0">
<widget class="QLabel" name="label_4">
<item row="10" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Estimated total blocks</string>
<string>Current number of blocks</string>
</property>
</widget>
</item>
<item row="11" column="1">
<item row="10" column="1">
<widget class="QLabel" name="numberOfBlocks">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
......@@ -263,10 +256,7 @@
<item row="11" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>&amp;Open</string>
</property>
<property name="autoDefault">
<bool>false</bool>
<string>Last block time</string>
</property>
</widget>
</item>
......@@ -325,7 +315,21 @@
</property>
</widget>
</item>
<item row="15" column="0">
<item row="15" column="0">
<widget class="QLabel" name="label_15">
<property name="text">
<string>Throne Count</string>
</property>
</widget>
</item>
<item row="15" column="1">
<widget class="QLabel" name="throneCount">
<property name="text">
<string>N/A</string>
</property>
</widget>
</item>
<item row="16" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
......@@ -337,21 +341,7 @@
</size>
</property>
</spacer>
</item>
<item row="9" column="0">
<widget class="QLabel" name="label_15">
<property name="text">
<string>Throne Count</string>
</property>
</widget>
</item>
<item row="9" column="1">
<widget class="QLabel" name="throneCount">
<property name="text">
<string>N/A</string>
</property>
</widget>
</item>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_console">
......@@ -695,4 +685,4 @@
<include location="../crowncoin.qrc"/>
</resources>
<connections/>
</ui>
</ui>
\ No newline at end of file
......@@ -191,7 +191,7 @@ bool PaymentServer::ipcParseCommandLine(int argc, char* argv[])
savedPaymentRequests.append(arg);
SendCoinsRecipient r;
if (GUIUtil::parseCrowncoinURI(arg, &r) && !r.address.isEmpty())
if (GUIUtil::parseCrowncoinURI(arg, &r) && !r.recipient.isEmpty())
{
CCrowncoinAddress address(r.recipient.toStdString());
......
......@@ -58,7 +58,7 @@ Object blockToJSON(const CBlock& block, const CBlockIndex* blockindex)
result.push_back(Pair("confirmations", (int)txGen.GetDepthInMainChain()));
result.push_back(Pair("size", (int)::GetSerializeSize(block, SER_NETWORK, PROTOCOL_VERSION)));
result.push_back(Pair("height", blockindex->nHeight));
result.push_back(Pair("version", block.nVersion));
result.push_back(Pair("version", block.nVersion.GetFullVersion()));
result.push_back(Pair("merkleroot", block.hashMerkleRoot.GetHex()));
Array txs;
BOOST_FOREACH(const CTransaction&tx, block.vtx)
......
......@@ -728,7 +728,7 @@ void JSONRequest::parse(const Value& valRequest)
throw JSONRPCError(RPC_INVALID_REQUEST, "Method must be a string");
strMethod = valMethod.get_str();
if (strMethod != "getwork" && strMethod != "getblocktemplate")
LogPrint("rpc", "ThreadRPCServer method=%s\n", SanitizeString(strMethod);
LogPrint("rpc", "ThreadRPCServer method=%s\n", SanitizeString(strMethod));
// Parse params
Value valParams = find_value(request, "params");
......
......@@ -146,22 +146,6 @@ bool CWallet::LoadCScript(const CScript& redeemScript)
return CCryptoKeyStore::AddCScript(redeemScript);
}
bool CWallet::Unlock(const SecureString& strWalletPassphrase)
{
/* A sanity check was added in pull #3843 to avoid adding redeemScripts
* that never can be redeemed. However, old wallets may still contain
* these. Do not add them to the wallet and warn. */
if (redeemScript.size() > MAX_SCRIPT_ELEMENT_SIZE)
{
std::string strAddr = CCrowncoinAddress(redeemScript.GetID()).ToString();
LogPrintf("%s: Warning: This wallet contains a redeemScript of size %i which exceeds maximum size %i thus can never be redeemed. Do not use address %s.\n",
__func__, redeemScript.size(), MAX_SCRIPT_ELEMENT_SIZE, strAddr);
return true;
}
return CCryptoKeyStore::AddCScript(redeemScript);
}
bool CWallet::Unlock(const SecureString& strWalletPassphrase, bool anonymizeOnly)
{
SecureString strWalletPassphraseFinal;
......@@ -172,6 +156,8 @@ bool CWallet::Unlock(const SecureString& strWalletPassphrase, bool anonymizeOnly
return true;
}
strWalletPassphraseFinal = strWalletPassphrase;
CCrypter crypter;
CKeyingMaterial vMasterKey;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment