[Dev] Documenting Feathercoin Specific Software settings - Part 3
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Support fork history commit
https://github.com/FeatherCoin/Feathercoin/commit/2ca14b4c772b5cd7e8b0e8f2b81e3ae9a3a6c87b
src/core.h
- //scrypt_1024_1_1_256(BEGIN(nVersion), BEGIN(thash));
Code removed
+ + uint256 GetPoWHashS() const + { + uint256 thash; + scrypt_1024_1_1_256(BEGIN(nVersion), BEGIN(thash)); + return thash; + }
Code added
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Support fork history commit
https://github.com/FeatherCoin/Feathercoin/commit/2ca14b4c772b5cd7e8b0e8f2b81e3ae9a3a6c87b
src/main.cpp
- if (fAllowFree && mode != GMF_SEND) - // Free transaction area - if (nBytes < 26000) - nMinFee = 0;
Code removed
+ if (fAllowFree) + // There is a free transaction area in blocks created by most miners, + // * If we are relaying we allow transactions up to DEFAULT_BLOCK_PRIORITY_SIZE - 1000 + // to be considered to fall into this category. We don't want to encourage sending + // multiple transactions instead of one big transaction to avoid fees. + // * If we are creating a transaction we allow transactions up to 5,000 bytes + // to be considered safe and assume they can likely make it into this section. + if (nBytes < (mode == GMF_SEND ? 5000 : (DEFAULT_BLOCK_PRIORITY_SIZE - 1000))) + nMinFee = 0; + } + + // This code can be removed after enough miners have upgraded to version 0.9. + // Until then, be safe when sending and require a fee if any output + // is less than CENT: + if (nMinFee < nBaseFee && mode == GMF_SEND) + { + BOOST_FOREACH(const CTxOut& txout, tx.vout) + if (txout.nValue < CENT) + nMinFee = nBaseFee;
Add new code
- // Feathercoin - // To limit dust spam, add nBaseFee for each output less than DUST_SOFT_LIMIT - BOOST_FOREACH(const CTxOut& txout, tx.vout) - if (txout.nValue < DUST_SOFT_LIMIT) - nMinFee += nBaseFee; -
Code removed
+ //if (!CheckProofOfWork(block.GetPoWHash(), block.nBits))
Code added
+ return error("Check the header ReadBlockFromDisk : Errors in block header");
Code replaced
+//int64_t nTargetTimespan = 60; // Feathercoin: 1 minute +//int64_t nTargetSpacing = 60; // Feathercoin: 1 minute +int nTargetTimespan = 3.5 * 24 * 60 * 60; // 3.5 days +int nTargetSpacing = 2.5 * 60; // 2.5 minutes
Code removed and // out
+ LogPrintf("GetNextWorkRequired pindexLast block Height=%d,nBits=%d \n",pindexLast->nHeight,pindexLast->nBits); + LogPrintf("GetNextWorkRequired the next block Height=%d \n",nHeight);
Log interface included
- if((nHeight >= nForkFour) || (TestNet && (nHeight >= nTestnetFork))) { + if((nHeight >= nForkFour) || (TestNet() && (nHeight >= nTestnetFork))) {
Code replaced can’t see what change, Testnet()?
+ LogPrintf("GetNextWorkRequired fork\n"); + LogPrintf("Difficulty rules regular blocks \n");
Code added
- for (int i = 0; pindexFirst && i < nInterval-1; i++) + for (int i = 0; pindexFirst && i < nInterval; i++)
Code replaced
- LogPrintf(" nActualTimespan = %d before bounds\n", nActualTimespan); + LogPrintf("GetNextWorkRequired(), nActualTimespan = %d before bounds\n", nActualTimespan); - printf("RETARGET: nActualTimespanShort = %d, nActualTimespanMedium = %d, nActualTimespanLong = %d, nActualTimeSpanAvg = %d, nActualTimespan (damped) = %d\n", + LogPrintf("RETARGET: nActualTimespanShort = %d, nActualTimespanMedium = %d, nActualTimespanLong = %d, nActualTimeSpanAvg = %d, nActualTimespan (damped) = %d\n", - printf("RETARGET: nActualTimespan = %d after bounds\n", nActualTimespan); + LogPrintf("RETARGET: nActualTimespan = %d after bounds\n", nActualTimespan); - printf("RETARGET: nTargetTimespan = %d, nTargetTimespan/nActualTimespan = %.4f\n", nTargetTimespan, (float) nTargetTimespan/nActualTimespan); + LogPrintf("RETARGET: nTargetTimespan = %d, nTargetTimespan/nActualTimespan = %.4f\n", nTargetTimespan, (float) nTargetTimespan/nActualTimespan);
Retarget changed to include damping?
- return error("CheckProofOfWork() : nBits below minimum work"); + return error("Check range CheckProofOfWork() : nBits below minimum work"); // Check proof of work matches claimed amount + LogPrintf("CheckProofOfWork() hash=%s \n",hash.ToString().c_str()); + LogPrintf("CheckProofOfWork() nBits=%i \n",nBits); + LogPrintf("CheckProofOfWork() bnTarget.getuint256=%s \n",bnTarget.getuint256().ToString().c_str());
POW code updated
- return error("CheckProofOfWork() : hash doesn't match nBits"); + return error("matches claimed amount, CheckProofOfWork() : hash doesn't match nBits");
Code replaced
- return state.Abort(_("Failed to read block")); + return state.Abort(_("DisconnectTip,Failed to read block"));
Code replaced
+ bool AddToBlockIndex(CBlock& block, CValidationState& state, const CDiskBlockPos& pos) + { + // Check for duplicate + uint256 hash = block.GetHash(); + if (mapBlockIndex.count(hash)) + return state.Invalid(error("AddToBlockIndex() : %s already exists", hash.ToString()), 0, "duplicate"); + + // Construct new block index object + CBlockIndex* pindexNew = new CBlockIndex(block); + assert(pindexNew); + { + LOCK(cs_nBlockSequenceId); + pindexNew->nSequenceId = nBlockSequenceId + + ; + } + map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.insert(make_pair(hash, pindexNew)).first; + pindexNew->phashBlock = &((*mi).first); + map<uint256, CBlockIndex*>::iterator miPrev = mapBlockIndex.find(block.hashPrevBlock); + if (miPrev != mapBlockIndex.end()) + { + pindexNew->pprev = (*miPrev).second; + pindexNew->nHeight = pindexNew->pprev->nHeight + 1; + } + pindexNew->nTx = block.vtx.size(); + pindexNew->nChainWork = (pindexNew->pprev ? pindexNew->pprev->nChainWork : 0) + pindexNew->GetBlockWork().getuint256(); + pindexNew->nChainTx = (pindexNew->pprev ? pindexNew->pprev->nChainTx : 0) + pindexNew->nTx; + pindexNew->nFile = pos.nFile; + pindexNew->nDataPos = pos.nPos; + pindexNew->nUndoPos = 0; + pindexNew->nStatus = BLOCK_VALID_TRANSACTIONS | BLOCK_HAVE_DATA; + setBlockIndexValid.insert(pindexNew); + + if (!pblocktree->WriteBlockIndex(CDiskBlockIndex(pindexNew))) + return state.Abort(_("Failed to write block index")); + + // New best? + if (!ActivateBestChain(state)) + return false; + + LOCK(cs_main); + if (pindexNew == chainActive.Tip()) + { + // Clear fork warning if its no longer applicable + CheckForkWarningConditions(); + // Notify UI to display prev block's coinbase if it was ours + static uint256 hashPrevBestCoinBase; + g_signals.UpdatedTransaction(hashPrevBestCoinBase); + hashPrevBestCoinBase = block.GetTxHash(0); + } else + CheckForkWarningConditionsOnNewFork(pindexNew); + + if (!pblocktree->Flush()) + return state.Abort(_("Failed to sync block index")); + + uiInterface.NotifyBlocksChanged(); + return true; + }
Code added
- //if (!pblocktree->WriteDiskBlockIndex(CDiskBlockIndex(pindexNew, block.auxpow)) || !pblocktree->WriteBlockIndex(*pindexNew)) + //if (!pblocktree->WriteDiskBlockIndex(CDiskBlockIndex(pindexNew)) || !pblocktree->WriteBlockIndex(*pindexNew)) + //if (!pblocktree->WriteBlockIndex(CDiskBlockIndex(pindexNew)))
code replaced
// each merged minable scrypt_1024_1_1_256 coin should have a different one
code removed
- if (!::CheckProofOfWork(GetPoWHash(), nBits)) + LogPrintf("CBlockHeader::CheckProofOfWork(), nHeight=%i \n",nHeight); - return error("CheckProofOfWork() : proof of work failed"); + if (nHeight==INT_MAX) + { + if (!::CheckProofOfWork(GetPoWHashS(), nBits)) + { + if (!::CheckProofOfWork(GetPoWHash(), nBits)) + { + LogPrintf("CBlockHeader::CheckProofOfWork(),GetPoWHash, nHeight=%i \n",nHeight); + return error("CBlockHeader::CheckProofOfWork() GetPoWHash: INT_MAX proof of work failed."); + } + } + return true; + } + + if (nHeight>=nForkFour) + { + if (!::CheckProofOfWork(GetPoWHash(), nBits)) + { + LogPrintf("CBlockHeader::CheckProofOfWork(),GetPoWHash, nHeight=%i \n",nHeight); + return error("CBlockHeader::CheckProofOfWork() GetPoWHash: proof of work failed."); + } + } + else + { + if (!::CheckProofOfWork(GetPoWHashS(), nBits)) + { + LogPrintf("CBlockHeader::CheckProofOfWork(),GetPoWHashS, nHeight=%i \n",nHeight); + return error("CBlockHeader::CheckProofOfWork() GetPoWHashS: proof of work failed."); + } + } + return true;
code replaced
+ //if (fCheckPOW && !CheckProofOfWork(block.GetPoWHash(), block.nBits)) + //if (fCheckPOW && !CheckProofOfWork(GetPoWHash(), nBits))
comments added
- return state.DoS(50, error("CheckBlockHeader() : proof of work failed"), + { + LogPrintf("CheckBlockHeader(),block.CheckProofOfWork, nHeight=%d \n",nHeight); + return state.DoS(50, error("CheckBlockHeader(),block.CheckProofOfWork : proof of work failed."), REJECT_INVALID, "high-hash"); + }
code replaced
+ LogPrintf("AcceptBlockHeader,nHeight=%d \n",nHeight); + + /* Don't accept blocks with bogus nVersion numbers after this point */ + if (nHeight >= nForkFour) { + if(block.nVersion != 2) + return(state.DoS(100, error("AcceptBlock() : incorrect block version"))); + } +
Additional code
- if (block.nBits != GetNextWorkRequired(pindexPrev, &block)) + unsigned int uiBits=GetNextWorkRequired(pindexPrev, &block); - return state.DoS(100, error("AcceptBlock() : incorrect proof of work"), + if (block.nBits !=uiBits ) + { + LogPrintf("AcceptBlockHeader,GetNextWorkRequired, uiBits=%d ,block.nBits=%d \n",uiBits,block.nBits); + return state.DoS(100, error("AcceptBlock(),Check proof of work : incorrect proof of work"), REJECT_INVALID, "bad -diffbits"); + }
code replaced
- pindex = AddToBlockIndex(block); + pindex = AddToBlockIndex(block);//from dogecoin + //pindex = pindexNew;
Code replaced
- // Preliminary checks + //Preliminary checks - if (!CheckBlock(*pblock, state, INT_MAX)) { + LogPrintf("ProcessBlock: Preliminary checks \n"); + //from dogecoin + /*if (!CheckBlock(*pblock, state, INT_MAX)) {
Code replaced
+ }*/ + //if (!CheckBlock(*pblock, state,nForkFour-1)) + //if (!CheckBlock(*pblock, state,1)) + if (!CheckBlock(*pblock, state, INT_MAX)) + return error("ProcessBlock() : CheckBlock FAILED");
Code added
- LogPrintf("ProcessBlock: ORPHAN BLOCK %lu, prev=%s\n", (unsigned long)mapOrphanBlocks.size(), pblock->hashPrevBlock.ToString()); + LogPrintf("ProcessBlock() ProcessBlock: ORPHAN BLOCK %lu, prev=%s\n", (unsigned long)mapOrphanBlocks.size(), pblock->hashPrevBlock.ToString());
Code replaced
+ //from bitcoin + //if (!AddToBlockIndex(block, state, blockPos)) + // return error("InitBlockIndex AddToBlockIndex() : genesis block not accepted"); + //from dogecoin
Code added
+ if (!ReceivedBlockTransactions(block, state, pindex, blockPos)) - return error("LoadBlockIndex() : genesis block not accepted"); + return error("InitBlockIndex ReceivedBlockTransactions() : genesis block not accepted");
Code replaced
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Support fork history commit
https://github.com/FeatherCoin/Feathercoin/commit/2ca14b4c772b5cd7e8b0e8f2b81e3ae9a3a6c87b
src/qt/forms/intro.ui
- <string>Welcome to Bitcoin Core.</string> + <string>Welcome to Feathercoin Core.</string>
Code replaced name, convert to be by translations?
+ <string>As this is the first time the program is launched, you can choose where Feathercoin Core will store its data.</string>
Replace Bitcoin code
+ <string>Feathercoin Core will download and store a copy of the Feathercoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</string>
Replace Bitcoin code name change
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Support fork history commit
https://github.com/FeatherCoin/Feathercoin/commit/2ca14b4c772b5cd7e8b0e8f2b81e3ae9a3a6c87b
src/qt/intro.cpp
+ QMessageBox::critical(0, tr("Feathercoin"),
Bitcoin code replaced name change
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Support fork history commit
https://github.com/FeatherCoin/Feathercoin/commit/2ca14b4c772b5cd7e8b0e8f2b81e3ae9a3a6c87b
src/qt/openuridialog.cpp
+ ui->uriEdit->setPlaceholderText("feathercoin:"); + ui->uriEdit->setText("feathercoin:?r=" + QUrl::toPercentEncoding(fileUri.toString()));
Code replaced name change
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Fix compile error commit
https://github.com/FeatherCoin/Feathercoin/commit/ce54ff5609afb5b7cace591a6a0c7ba500f15ac1
src/base58.cpp
+ // Copyright (c) 2014 The Bitcoin developers + // Distributed under the MIT/X11 software license, see the accompanying + // file COPYING or http://www.opensource.org/licenses/mit-license.php. + + #include "base58.h" + + #include "hash.h" + #include "uint256.h" + + #include <assert.h> + #include <stdint.h> + #include <string.h> + #include <vector> + #include <string> + #include <boost/variant/apply_visitor.hpp> + #include <boost/variant/static_visitor.hpp> + + /* All alphanumeric characters except for "0", "I", "O", and "l" */ + static const char* pszBase58 =
New files start. 273 lines
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Fix compile error commit
https://github.com/FeatherCoin/Feathercoin/commit/ce54ff5609afb5b7cace591a6a0c7ba500f15ac1
src/base58.h
New file
// Why base-58 instead of standard base-64 encoding? // - Don't want 0OIl characters that look the same in some fonts and // could be used to create visually identical looking account numbers. // - A string with non-alphanumeric characters is not as easily accepted as an account number. // - E-mail usually won't line-break if there's no punctuation to break at. // - Double-clicking selects the whole number as one word if it's all alphanumeric. // #ifndef BITCOIN_BASE58_H #define BITCOIN_BASE58_H #include "chainparams.h" #include "key.h" #include "script.h" #include <string> #include <vector> /** * Encode a byte sequence as a base58-encoded string. * pbegin and pend cannot be NULL, unless both are. */ std::string EncodeBase58(const unsigned char* pbegin, const unsigned char* pend);
New file .150 starts.here, where from?
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Fix compile error commit
https://github.com/FeatherCoin/Feathercoin/commit/ce54ff5609afb5b7cace591a6a0c7ba500f15ac1
src/mruset.h
+ void clear() { set.clear(); queue.clear(); }
Add code
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Fix compile error commit
https://github.com/FeatherCoin/Feathercoin/commit/ce54ff5609afb5b7cace591a6a0c7ba500f15ac1
src/netbase.h
-#ifdef USE_IPV6
2 if defs for iPv6 Code removed
+/** Return readable error string for a network error code */ +std::string NetworkErrorString(int err);
Code added
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Fix compile error commit
https://github.com/FeatherCoin/Feathercoin/commit/ce54ff5609afb5b7cace591a6a0c7ba500f15ac1
src/rpcmisc.cpp
- obj.push_back(Pair("timeoffset", (boost::int64_t)GetTimeOffset())); + obj.push_back(Pair("timeoffset", GetTimeOffset())); - obj.push_back(Pair("timeoffset", (boost::int64_t)GetTimeOffset())); + obj.push_back(Pair("timeoffset", GetTimeOffset())); - obj.push_back(Pair("unlocked_until", (boost::int64_t)nWalletUnlockTime)); + obj.push_back(Pair("unlocked_until", nWalletUnlockTime)); - CScript _createmultisig(const Array& params) + CScript _createmultisig_redeemScript(const Array& params)
Code replaced
+ + if (result.size() > MAX_SCRIPT_ELEMENT_SIZE) + throw runtime_error( + strprintf("redeemScript exceeds size limit: %d > %d", result.size(), MAX_SCRIPT_ELEMENT_SIZE)); +
Additional code
- CScript inner = _createmultisig(params); + CScript inner = _createmultisig_redeemScript(params);
Code replaced
+ "verifymessage \"feathercoinaddress\" \"signature\" \"message\"\n" + "1. \"feathercoinaddress\" (string, required) The feathercoin address to use for the signature.\n"
Code replaced name change
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Fix compile error commit
https://github.com/FeatherCoin/Feathercoin/commit/ce54ff5609afb5b7cace591a6a0c7ba500f15ac1
src/rpcprotocol.cpp
- char buffer[64]; - time(&now); - time_t now; - struct tm* now_gmt = gmtime(&now); - string locale(setlocale(LC_TIME, NULL)); - setlocale(LC_TIME, "C"); // we want POSIX (aka "C") weekday/month strings - strftime(buffer, sizeof(buffer), "%a, %d %b %Y %H:%M:%S +0000", now_gmt); - setlocale(LC_TIME, locale.c_str()); - return string(buffer);
Code replaced
+ return DateTimeStrFormat("%a, %d %b %Y %H:%M:%S +0000", GetTime());
Code added to replace code
- "Content-Length: %"PRIszu"\r\n" + "Content-Length: %u\r\n"
Code replaced
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Fix compile error commit
https://github.com/FeatherCoin/Feathercoin/commit/ce54ff5609afb5b7cace591a6a0c7ba500f15ac1
src/serialize.h
-#define FLATDATA(obj) REF(CFlatData((char*)&(obj), (char*)&(obj+ sizeof(obj))) + #define FLATDATA(obj) REF(CFlatData((char*)&(obj), (char*)&(obj)+ sizeof(obj))) -#define VARINT(obj) REF(WrapVarInt(REF(obj))) + #define VARINT(obj) REF(WrapVarInt(REF(obj))) + #define LIMITED_STRING(obj,n) REF(LimitedString< n >(REF(obj)))
Replace code
+ template<size_t Limit> + class LimitedString + { + protected: + std::string& string; + public: + LimitedString(std::string& string) : string(string) {} + + template<typename Stream> + void Unserialize(Stream& s, int, int=0) + { + size_t size = ReadCompactSize(s); + if (size > Limit) { + throw std::ios_base::failure("String length limit exceeded"); + } + string.resize(size); + if (size != 0) + s.read((char*)&string[0], size); + } + + template<typename Stream> + void Serialize(Stream& s, int, int=0) const + { + WriteCompactSize(s, string.size()); + if (!string.empty()) + s.write((char*)&string[0], string.size()); + } + + unsigned int GetSerializeSize(int, int=0) const + { + return GetSizeOfCompactSize(string.size()) + string.size(); + } + }; +
Added code
- { setstate(std::ios::failbit, "CDataStream::ignore() : end of data"); - nSize = vch.size() - nReadPos; - }
Code removed
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Fix compile error 2 - commit
https://github.com/FeatherCoin/Feathercoin/commit/eca6f424ab7d927436a38af434ad357946c8219c
src/rpcblockchain.cpp
+#include "checkpoints.h"
Additional code
- result.push_back(Pair("time", (boost::int64_t)block.GetBlockTime())); + result.push_back(Pair("time", block.GetBlockTime())); - result.push_back(Pair("nonce", (boost::uint64_t)block.nNonce)); + result.push_back(Pair("nonce", (uint64_t)block.nNonce)); - info.push_back(Pair("time", (boost::int64_t)e.GetTime())); + info.push_back(Pair("time", e.GetTime())); - ReadBlockFromDisk(block, pblockindex); + + if(!ReadBlockFromDisk(block, pblockindex)) + throw JSONRPCError(RPC_INTERNAL_ERROR, "Can't read block from disk"); - ret.push_back(Pair("height", (boost::int64_t)stats.nHeight)); + ret.push_back(Pair("height", (int64_t)stats.nHeight)); - ret.push_back(Pair("transactions", (boost::int64_t)stats.nTransactions)); + ret.push_back(Pair("transactions", (int64_t)stats.nTransactions)); - ret.push_back(Pair("txouts", (boost::int64_t)stats.nTransactionOutputs)); + ret.push_back(Pair("txouts", (int64_t)stats.nTransactionOutputs)); - ret.push_back(Pair("bytes_serialized", (boost::int64_t)stats.nSerializedSize)); + ret.push_back(Pair("bytes_serialized", (int64_t)stats.nSerializedSize));
Replace code
+ Value getblockchaininfo(const Array& params, bool fHelp) + { + if (fHelp || params.size() != 0) + throw runtime_error( + "getblockchaininfo\n" + "Returns an object containing various state info regarding block chain processing.\n" + "\nResult:\n" + "{\n" + " \"chain\": \"xxxx\", (string) current chain (main, testnet3, regtest)\n" + " \"blocks\": xxxxxx, (numeric) the current number of blocks processed in the server\n" + " \"bestblockhash\": \"...\", (string) the hash of the currently best block\n" + " \"difficulty\": xxxxxx, (numeric) the current difficulty\n" + " \"verificationprogress\": xxxx, (numeric) estimate of verification progress [0..1]\n" + " \"chainwork\": \"xxxx\" (string) total amount of work in active chain, in hexadecimal\n" + "}\n" + "\nExamples:\n" + + HelpExampleCli("getblockchaininfo", "") + + HelpExampleRpc("getblockchaininfo", "") + ); + + proxyType proxy; + GetProxy(NET_IPV4, proxy); + + Object obj; + std::string chain = Params().DataDir(); + if(chain.empty()) + chain = "main"; + obj.push_back(Pair("chain", chain)); + obj.push_back(Pair("blocks", (int)chainActive.Height())); + obj.push_back(Pair("bestblockhash", chainActive.Tip()->GetBlockHash().GetHex())); + obj.push_back(Pair("difficulty", (double)GetDifficulty())); + obj.push_back(Pair("verificationprogress", Checkpoints::GuessVerificationProgress(chainActive.Tip()))); + obj.push_back(Pair("chainwork", chainActive.Tip()->nChainWork.GetHex())); + return obj; + }
Additional code for getblockchaininfo
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Fix compile error 2 - commit
https://github.com/FeatherCoin/Feathercoin/commit/eca6f424ab7d927436a38af434ad357946c8219c
src/rpcwallet.cpp
- entry.push_back(Pair("blocktime", (boost::int64_t)(mapBlockIndex[wtx.hashBlock]->nTime))); + entry.push_back(Pair("blocktime", (int64_t)(mapBlockIndex[wtx.hashBlock]->nTime)));
Code replaced
- entry.push_back(Pair("time", (boost::int64_t)wtx.GetTxTime())); + entry.push_back(Pair("time", wtx.GetTxTime())); - entry.push_back(Pair("timereceived", (boost::int64_t)wtx.nTimeReceived)); + entry.push_back(Pair("timereceived", (int64_t)wtx.nTimeReceived)); - "\"transactionid\" (string) The transaction id. (view at https://blockchain.info/tx/[transactionid])\n" + "\"transactionid\" (string) The transaction id.\n" - "\"transactionid\" (string) The transaction id. (view at https://blockchain.info/tx/[transactionid])\n" + "\"transactionid\" (string) The transaction id.\n" - " the number of addresses. See https://blockchain.info/tx/[transactionid]\n" + " the number of addresses.\n" -extern CScript _createmultisig(const Array& params); + extern CScript _createmultisig_redeemScript(const Array& params); - CScript inner = _createmultisig(params); + CScript inner = _createmultisig_redeemScript(params); - entry.push_back(Pair("time", (boost::int64_t)acentry.nTime)); + entry.push_back(Pair("time", acentry.nTime)); - " \"txid\": \"transactionid\", (string) The transaction id (see https://blockchain.info/tx/[transactionid]. Available \n" + " \"txid\": \"transactionid\", (string) The transaction id. Available for 'send' and 'receive' category of transactions.\n" - " for 'send' and 'receive' category of transactions.\n" - " \"txid\": \"transactionid\", (string) The transaction id (see https://blockchain.info/tx/[transactionid]. Available for 'send' and 'receive' category of transactions.\n" + " \"txid\" : \"transactionid\", (string) The transaction id.\n" - "Temporarily lock (lock=true) or unlock (lock=false) specified transaction outputs.\n" + "Temporarily lock (unlock=false) or unlock (unlock=true) specified transaction outputs.\n" - obj.push_back(Pair("keypoololdest", (boost::int64_t)pwalletMain ->GetOldestKeyPoolTime())); + obj.push_back(Pair("keypoololdest", pwalletMain ->GetOldestKeyPoolTime())); - obj.push_back(Pair("unlocked_until", (boost::int64_t)nWalletUnlockTime)); + obj.push_back(Pair("unlocked_until", nWalletUnlockTime));
Code replaced
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Fix lost file - commit
https://github.com/FeatherCoin/Feathercoin/commit/1d396a14752fbe8120f4bebe0ebfaaa69fba3531
src/qt/locale/bitcoin_mn.ts
Translation file complete
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Fix lost files 2- commit
https://github.com/FeatherCoin/Feathercoin/commit/388d6bdb1cfd96b8634b5c7f5f8b392990abe7d2
src/qt/guiutil.h
+ + // Replace invalid default fonts with known good ones + void SubstituteFonts(); +
Additional code
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Fix lost files 2- commit
https://github.com/FeatherCoin/Feathercoin/commit/388d6bdb1cfd96b8634b5c7f5f8b392990abe7d2
src/qt/optionsmodel.h
+ ThirdPartyTxUrls, // QString + QString getThirdPartyTxUrls() { return strThirdPartyTxUrls; } + QString strThirdPartyTxUrls;
Additional code
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Fix lost files 2- commit
https://github.com/FeatherCoin/Feathercoin/commit/388d6bdb1cfd96b8634b5c7f5f8b392990abe7d2
src/qt/rpcconsole.h
- void setNumBlocks(int count, int countOfPeers); + void setNumBlocks(int count);
Code replaced
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Fix lost files 2- commit
https://github.com/FeatherCoin/Feathercoin/commit/388d6bdb1cfd96b8634b5c7f5f8b392990abe7d2
src/qt/transactiontablemodel.cpp
-#include <QTimer>
Code removed
- LOCK(wallet->cs_wallet); + LOCK2(cs_main, wallet->cs_wallet);
Lock code replaced twice
+ // Get required locks upfront. This avoids the GUI from getting + // stuck if the core is holding the locks for a longer time - for + // example, during a wallet rescan. + //
Additional comments
- if(rec->statusUpdateNeeded()) + TRY_LOCK(cs_main, lockMain); + if(lockMain) { + TRY_LOCK(wallet->cs_wallet, lockWallet); + if(lockWallet && rec->statusUpdateNeeded()) { - LOCK(wallet->cs_wallet);
Code replaced
- LOCK(wallet->cs_wallet); + LOCK2(cs_main, wallet->cs_wallet);
Lock code replaced
- priv(new TransactionTablePriv(wallet, this)), + priv(new TransactionTablePriv(wallet, this)) - cachedNumBlocks(0)
Code replaced
- QTimer *timer = new QTimer(this); - connect(timer, SIGNAL(timeout()), this, SLOT(updateConfirmations())); - timer->start(MODEL_UPDATE_DELAY); -
Code removed
- { - cachedNumBlocks = chainActive.Height(); - // Blocks came in since last poll. - // Invalidate status (number of confirmations) and (possibly) description - // for all rows. Qt is smart enough to only actually request the data for the - // visible rows. - emit dataChanged(index(0, Status), index(priv ->size() -1, Status)); - emit dataChanged(index(0, ToAddress), index(priv ->size() -1, ToAddress)); - }
Code removed
+ // Blocks came in since last poll. + // Invalidate status (number of confirmations) and (possibly) description + // for all rows. Qt is smart enough to only actually request the data for the + // visible rows. + emit dataChanged(index(0, Status), index(priv ->size() -1, Status)); + emit dataChanged(index(0, ToAddress), index(priv ->size() -1, ToAddress));
Code replaces removed code
+ case TxHashRole: + return QString::fromStdString(rec->hash.ToString());
Additional code
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Fix lost files 2- commit
https://github.com/FeatherCoin/Feathercoin/commit/388d6bdb1cfd96b8634b5c7f5f8b392990abe7d2
src/qt/transactiontablemodel.h
Wallet transaction screen.
+ /** Transaction hash */ + TxHashRole,
Code added
- int cachedNumBlocks;
Code removed