[Dev] Documenting Feathercoin Specific Software settings - Part 1
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/dd48f45ec1b22a82fb8c94eee647e1e8a1c1013c
auxpow.h
auxpow.h contains a number of Feathercoin settings , from Litecoin, for scrypt interface change Maintain separately / cherry pick?
Additional file to Bitcoin.
This could be specified as an alternate file at build time?
+ // Copyright (c) 2009-2010 Satoshi Nakamoto + // Distributed under the MIT/X11 software license, see the accompanying + // file license.txt or http://www.opensource.org/licenses/mit-license.php. + #ifndef BITCOIN_AUXPOW_H + #define BITCOIN_AUXPOW_H + + #include "main.h" + + class CAuxPow : public CMerkleTx + { + public: + CAuxPow(const CTransaction& txIn) : CMerkleTx(txIn) + { + } + + CAuxPow() :CMerkleTx() + { + } + + // Merkle branch with root vchAux + // root must be present inside the coinbase + std::vector<uint256> vChainMerkleBranch; + // Index of chain in chains merkle tree + unsigned int nChainIndex; + CBlockHeader parentBlockHeader; + + IMPLEMENT_SERIALIZE + ( + nSerSize + = SerReadWrite(s, *(CMerkleTx*)this, nType, nVersion, ser_action); + nVersion = this->nVersion; + READWRITE(vChainMerkleBranch); + READWRITE(nChainIndex); + + // Always serialize the saved parent block as header so that the size of CAuxPow + // is consistent. + nSerSize + = SerReadWrite(s, parentBlockHeader, nType, nVersion, ser_action); + ) + + bool Check(uint256 hashAuxBlock, int nChainID); + + uint256 GetParentBlockHash() + { + return parentBlockHeader.GetPoWHash(); + } + }; + + template <typename Stream> + int ReadWriteAuxPow(Stream& s, const boost::shared_ptr<CAuxPow>& auxpow, int nType, int nVersion, CSerActionGetSerializeSize ser_action) + { + if (nVersion & BLOCK_VERSION_AUXPOW) + { + return ::GetSerializeSize(*auxpow, nType, nVersion); + } + return 0; + } + + template <typename Stream> + int ReadWriteAuxPow(Stream& s, const boost::shared_ptr<CAuxPow>& auxpow, int nType, int nVersion, CSerActionSerialize ser_action) + { + if (nVersion & BLOCK_VERSION_AUXPOW) + { + return SerReadWrite(s, *auxpow, nType, nVersion, ser_action); + } + return 0; + } + + template <typename Stream> + int ReadWriteAuxPow(Stream& s, boost::shared_ptr<CAuxPow>& auxpow, int nType, int nVersion, CSerActionUnserialize ser_action) + { + if (nVersion & BLOCK_VERSION_AUXPOW) + { + auxpow.reset(new CAuxPow()); + return SerReadWrite(s, *auxpow, nType, nVersion, ser_action); + } + else + { + auxpow.reset(); + return 0; + } + } + + extern void RemoveMergedMiningHeader(std::vector<unsigned char>& vchAux); + extern CScript MakeCoinbaseWithAux(unsigned int nBits, unsigned int nExtraNonce, std::vector<unsigned char>& vchAux); + #endif
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/dd48f45ec1b22a82fb8c94eee647e1e8a1c1013c
scrypt.cpp
scrypt.cpp contains a number of Feathercoin settings , from Litecoin, for scrypt interface change Maintain separately / cherry pick?
Additional file to Bitcoin.
This could be specified as an alternate file at build time?
+ /* + * Copyright 2009 Colin Percival, 2011 ArtForz, 2012-2013 pooler + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * This file was originally written by Colin Percival as part of the Tarsnap + * online backup system. + */ + + // Copyright (c) 2013-2014 Dogecoin Developers + + #include "scrypt.h" + #include "util.h" + #include <stdlib.h> + #include <stdint.h> + #include <string.h> + #include <openssl/sha.h> + + #if defined(USE_SSE2) && !defined(USE_SSE2_ALWAYS) + #ifdef _MSC_VER + // MSVC 64bit is unable to use inline asm + #include <intrin.h> + #else + // GCC Linux or i686-w64-mingw32 + #include <cpuid.h> + #endif + #endif + + static inline uint32_t be32dec(const void *pp) + { + const uint8_t *p = (uint8_t const *)pp; + return ((uint32_t)(p[3]) + ((uint32_t)(p[2]) << 8) + + ((uint32_t)(p[1]) << 16) + ((uint32_t)(p[0]) << 24)); + } + + static inline void be32enc(void *pp, uint32_t x) + { + uint8_t *p = (uint8_t *)pp; + p[3] = x & 0xff; + p[2] = (x >> 8) & 0xff; + p[1] = (x >> 16) & 0xff; + p[0] = (x >> 24) & 0xff; + } + + typedef struct HMAC_SHA256Context { + SHA256_CTX ictx; + SHA256_CTX octx; + } HMAC_SHA256_CTX; + + /* Initialize an HMAC-SHA256 operation with the given key. */ + static void + HMAC_SHA256_Init(HMAC_SHA256_CTX *ctx, const void *_K, size_t Klen) + { + unsigned char pad[64]; + unsigned char khash[32]; + const unsigned char *K = (const unsigned char *)_K; + size_t i; + + /* If Klen > 64, the key is really SHA256(K). */ + if (Klen > 64) { + SHA256_Init(&ctx->ictx); + SHA256_Update(&ctx->ictx, K, Klen); + SHA256_Final(khash, &ctx->ictx); + K = khash; + Klen = 32; + } + + /* Inner SHA256 operation is SHA256(K xor [block of 0x36] || data). */ + SHA256_Init(&ctx->ictx); + memset(pad, 0x36, 64); + for (i = 0; i < Klen; i + + ) + pad[i] ^= K[i]; + SHA256_Update(&ctx->ictx, pad, 64); + + /* Outer SHA256 operation is SHA256(K xor [block of 0x5c] || hash). */ + SHA256_Init(&ctx->octx); + memset(pad, 0x5c, 64); + for (i = 0; i < Klen; i + + ) + pad[i] ^= K[i]; + SHA256_Update(&ctx->octx, pad, 64); + + /* Clean the stack. */ + memset(khash, 0, 32); + } + + /* Add bytes to the HMAC-SHA256 operation. */ + static void + HMAC_SHA256_Update(HMAC_SHA256_CTX *ctx, const void *in, size_t len) + { + /* Feed data to the inner SHA256 operation. */ + SHA256_Update(&ctx->ictx, in, len); + } + + /* Finish an HMAC-SHA256 operation. */ + static void + HMAC_SHA256_Final(unsigned char digest[32], HMAC_SHA256_CTX *ctx) + { + unsigned char ihash[32]; + + /* Finish the inner SHA256 operation. */ + SHA256_Final(ihash, &ctx->ictx); + + /* Feed the inner hash to the outer SHA256 operation. */ + SHA256_Update(&ctx->octx, ihash, 32); + + /* Finish the outer SHA256 operation. */ + SHA256_Final(digest, &ctx->octx); + + /* Clean the stack. */ + memset(ihash, 0, 32); + } + + /** + * PBKDF2_SHA256(passwd, passwdlen, salt, saltlen, c, buf, dkLen): + * Compute PBKDF2(passwd, salt, c, dkLen) using HMAC-SHA256 as the PRF, and + * write the output to buf. The value dkLen must be at most 32 * (2^32 - 1). + */ + void + PBKDF2_SHA256(const uint8_t *passwd, size_t passwdlen, const uint8_t *salt, + size_t saltlen, uint64_t c, uint8_t *buf, size_t dkLen) + { + HMAC_SHA256_CTX PShctx, hctx; + size_t i; + uint8_t ivec[4]; + uint8_t U[32]; + uint8_t T[32]; + uint64_t j; + int k; + size_t clen; + + /* Compute HMAC state after processing P and S. */ + HMAC_SHA256_Init(&PShctx, passwd, passwdlen); + HMAC_SHA256_Update(&PShctx, salt, saltlen); + + /* Iterate through the blocks. */ + for (i = 0; i * 32 < dkLen; i + + ) { + /* Generate INT(i + 1). */ + be32enc(ivec, (uint32_t)(i + 1)); + + /* Compute U_1 = PRF(P, S || INT(i)). */ + memcpy(&hctx, &PShctx, sizeof(HMAC_SHA256_CTX)); + HMAC_SHA256_Update(&hctx, ivec, 4); + HMAC_SHA256_Final(U, &hctx); + + /* T_i = U_1 ... */ + memcpy(T, U, 32); + + for (j = 2; j <= c; j + + ) { + /* Compute U_j. */ + HMAC_SHA256_Init(&hctx, passwd, passwdlen); + HMAC_SHA256_Update(&hctx, U, 32); + HMAC_SHA256_Final(U, &hctx); + + /* ... xor U_j ... */ + for (k = 0; k < 32; k + + ) + T[k] ^= U[k]; + } + + /* Copy as many bytes as necessary into buf. */ + clen = dkLen - i * 32; + if (clen > 32) + clen = 32; + memcpy(&buf[i * 32], T, clen); + } + + /* Clean PShctx, since we never called _Final on it. */ + memset(&PShctx, 0, sizeof(HMAC_SHA256_CTX)); + } + + #define ROTL(a, b) (((a) << (b)) | ((a) >> (32 - (b)))) + + static inline void xor_salsa8(uint32_t B[16], const uint32_t Bx[16]) + { + uint32_t x00,x01,x02,x03,x04,x05,x06,x07,x08,x09,x10,x11,x12,x13,x14,x15; + int i; + + x00 = (B[ 0] ^= Bx[ 0]); + x01 = (B[ 1] ^= Bx[ 1]); + x02 = (B[ 2] ^= Bx[ 2]); + x03 = (B[ 3] ^= Bx[ 3]); + x04 = (B[ 4] ^= Bx[ 4]); + x05 = (B[ 5] ^= Bx[ 5]); + x06 = (B[ 6] ^= Bx[ 6]); + x07 = (B[ 7] ^= Bx[ 7]); + x08 = (B[ 8] ^= Bx[ 8]); + x09 = (B[ 9] ^= Bx[ 9]); + x10 = (B[10] ^= Bx[10]); + x11 = (B[11] ^= Bx[11]); + x12 = (B[12] ^= Bx[12]); + x13 = (B[13] ^= Bx[13]); + x14 = (B[14] ^= Bx[14]); + x15 = (B[15] ^= Bx[15]); + for (i = 0; i < 8; i + = 2) { + /* Operate on columns. */ + x04 ^= ROTL(x00 + x12, 7); x09 ^= ROTL(x05 + x01, 7); + x14 ^= ROTL(x10 + x06, 7); x03 ^= ROTL(x15 + x11, 7); + + x08 ^= ROTL(x04 + x00, 9); x13 ^= ROTL(x09 + x05, 9); + x02 ^= ROTL(x14 + x10, 9); x07 ^= ROTL(x03 + x15, 9); + + x12 ^= ROTL(x08 + x04, 13); x01 ^= ROTL(x13 + x09, 13); + x06 ^= ROTL(x02 + x14, 13); x11 ^= ROTL(x07 + x03, 13); + + x00 ^= ROTL(x12 + x08, 18); x05 ^= ROTL(x01 + x13, 18); + x10 ^= ROTL(x06 + x02, 18); x15 ^= ROTL(x11 + x07, 18); + + /* Operate on rows. */ + x01 ^= ROTL(x00 + x03, 7); x06 ^= ROTL(x05 + x04, 7); + x11 ^= ROTL(x10 + x09, 7); x12 ^= ROTL(x15 + x14, 7); + + x02 ^= ROTL(x01 + x00, 9); x07 ^= ROTL(x06 + x05, 9); + x08 ^= ROTL(x11 + x10, 9); x13 ^= ROTL(x12 + x15, 9); + + x03 ^= ROTL(x02 + x01, 13); x04 ^= ROTL(x07 + x06, 13); + x09 ^= ROTL(x08 + x11, 13); x14 ^= ROTL(x13 + x12, 13); + + x00 ^= ROTL(x03 + x02, 18); x05 ^= ROTL(x04 + x07, 18); + x10 ^= ROTL(x09 + x08, 18); x15 ^= ROTL(x14 + x13, 18); + } + B[ 0] + = x00; + B[ 1] + = x01; + B[ 2] + = x02; + B[ 3] + = x03; + B[ 4] + = x04; + B[ 5] + = x05; + B[ 6] + = x06; + B[ 7] + = x07; + B[ 8] + = x08; + B[ 9] + = x09; + B[10] + = x10; + B[11] + = x11; + B[12] + = x12; + B[13] + = x13; + B[14] + = x14; + B[15] + = x15; + } + + void scrypt_1024_1_1_256_sp_generic(const char *input, char *output, char *scratchpad) + { + uint8_t B[128]; + uint32_t X[32]; + uint32_t *V; + uint32_t i, j, k; + + V = (uint32_t *)(((uintptr_t)(scratchpad) + 63) & ~ (uintptr_t)(63)); + + PBKDF2_SHA256((const uint8_t *)input, 80, (const uint8_t *)input, 80, 1, B, 128); + + for (k = 0; k < 32; k + + ) + X[k] = le32dec(&B[4 * k]); + + for (i = 0; i < 1024; i + + ) { + memcpy(&V[i * 32], X, 128); + xor_salsa8(&X[0], &X[16]); + xor_salsa8(&X[16], &X[0]); + } + for (i = 0; i < 1024; i + + ) { + j = 32 * (X[16] & 1023); + for (k = 0; k < 32; k + + ) + X[k] ^= V[j + k]; + xor_salsa8(&X[0], &X[16]); + xor_salsa8(&X[16], &X[0]); + } + + for (k = 0; k < 32; k + + ) + le32enc(&B[4 * k], X[k]); + + PBKDF2_SHA256((const uint8_t *)input, 80, B, 128, 1, (uint8_t *)output, 32); + } + + #if defined(USE_SSE2) + // By default, set to generic scrypt function. This will prevent crash in case when scrypt_detect_sse2() wasn't called + void (*scrypt_1024_1_1_256_sp_detected)(const char *input, char *output, char *scratchpad) = &scrypt_1024_1_1_256_sp_generic; + + void scrypt_detect_sse2() + { + #if defined(USE_SSE2_ALWAYS) + printf("scrypt: using scrypt-sse2 as built.\n"); + #else // USE_SSE2_ALWAYS + // 32bit x86 Linux or Windows, detect cpuid features + unsigned int cpuid_edx=0; + #if defined(_MSC_VER) + // MSVC + int x86cpuid[4]; + __cpuid(x86cpuid, 1); + cpuid_edx = (unsigned int)buffer[3]; + #else // _MSC_VER + // Linux or i686-w64-mingw32 (gcc-4.6.3) + unsigned int eax, ebx, ecx; + __get_cpuid(1, &eax, &ebx, &ecx, &cpuid_edx); + #endif // _MSC_VER + + if (cpuid_edx & 1<<26) + { + scrypt_1024_1_1_256_sp_detected = &scrypt_1024_1_1_256_sp_sse2; + printf("scrypt: using scrypt-sse2 as detected.\n"); + } + else + { + scrypt_1024_1_1_256_sp_detected = &scrypt_1024_1_1_256_sp_generic; + printf("scrypt: using scrypt-generic, SSE2 unavailable.\n"); + } + #endif // USE_SSE2_ALWAYS + } + #endif + + void scrypt_1024_1_1_256(const char *input, char *output) + { + char scratchpad[SCRYPT_SCRATCHPAD_SIZE]; + scrypt_1024_1_1_256_sp(input, output, scratchpad); + }
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/30516a6ce8d723cc3d8eb624e2d30431843f01a0
script.cpp
Commit 2
- #include "bignum.h"
Biitcoin code removed
+static const CScriptNum bnZero(0); +static const CScriptNum bnOne(1); +static const CScriptNum bnFalse(0); +static const CScriptNum bnTrue(1);
Scrypt interface.
-CBigNum CastToBigNum(const valtype& vch) -{ - if (vch.size() > nMaxNumSize) - throw runtime_error("CastToBigNum() : overflow"); - // Get rid of extra leading zeros - return CBigNum(CBigNum(vch).getvch()); -} - if (flags & SCRIPT_VERIFY_EVEN_S) { - if (S[nLenS-1] & 1) - return error("Non-canonical signature: S value odd"); - CAutoBN_CTX pctx;
Remove Bitcoin code.
+ if (flags & SCRIPT_VERIFY_LOW_S) { + // If the S value is above the order of the curve divided by two, its + // complement modulo the order could have been used instead, which is + // one byte shorter when encoded correctly. + if (!CKey::CheckSignatureElement(S, nLenS, true)) + return error("Non-canonical signature: S value is unnecessarily high");
Scrypt code removed
+ CScriptNum bn((int)opcode - (int)(OP_1 - 1));
Bitcoin code replaced. Scrypt interface
+ CScriptNum bn(stack.size()); + int n = CScriptNum(stacktop(-1)).getint(); + CScriptNum bn(stacktop(-1).size()); + CScriptNum bn(stacktop(-1)); + CScriptNum bn1(stacktop(-2)); + CScriptNum bn2(stacktop(-1)); + CScriptNum bn(0); + CScriptNum bn1(stacktop(-3)); + CScriptNum bn2(stacktop(-2)); + CScriptNum bn3(stacktop(-1)); + int nKeysCount = CScriptNum(stacktop(-i)).getint(); + int nSigsCount = CScriptNum(stacktop(-i)).getint();
Bitcoin code replaced. Scrypt interface
+ // Feathercoin address tx, sender provides hash of pubkey, receiver provides signature and pubkey
Name change for comment?
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/9346686d71f874429a5b0508bdc3be50850e7b66
scrypt.h
scrypt.h contains a number of Feathercoin settings , from Litecoin / Dogecoin? , for scrypt interface change Maintain separately / cherry pick?
Additional file to Bitcoin.
This could be specified as an alternate file at build time?
+ // Copyright (c) 2013-2014 Dogecoin Developers + + #ifndef SCRYPT_H + #define SCRYPT_H + #include <stdlib.h> + #include <stdint.h> + + static const int SCRYPT_SCRATCHPAD_SIZE = 131072 + 63; + + void scrypt_1024_1_1_256(const char *input, char *output); + void scrypt_1024_1_1_256_sp_generic(const char *input, char *output, char *scratchpad); + + #if defined(USE_SSE2) + #if defined(_M_X64) || defined(__x86_64__) || defined(_M_AMD64) || (defined(MAC_OSX) && defined(__i386__)) + #define USE_SSE2_ALWAYS 1 + #define scrypt_1024_1_1_256_sp(input, output, scratchpad) scrypt_1024_1_1_256_sp_sse2((input), (output), (scratchpad)) + #else + #define scrypt_1024_1_1_256_sp(input, output, scratchpad) scrypt_1024_1_1_256_sp_detected((input), (output), (scratchpad)) + #endif + + void scrypt_detect_sse2(); + void scrypt_1024_1_1_256_sp_sse2(const char *input, char *output, char *scratchpad); + extern void (*scrypt_1024_1_1_256_sp_detected)(const char *input, char *output, char *scratchpad); + #else + #define scrypt_1024_1_1_256_sp(input, output, scratchpad) scrypt_1024_1_1_256_sp_generic((input), (output), (scratchpad)) + #endif + + void + PBKDF2_SHA256(const uint8_t *passwd, size_t passwdlen, const uint8_t *salt, + size_t saltlen, uint64_t c, uint8_t *buf, size_t dkLen); + + static inline uint32_t le32dec(const void *pp) + { + const uint8_t *p = (uint8_t const *)pp; + return ((uint32_t)(p[0]) + ((uint32_t)(p[1]) << 8) + + ((uint32_t)(p[2]) << 16) + ((uint32_t)(p[3]) << 24)); + } + + static inline void le32enc(void *pp, uint32_t x) + { + uint8_t *p = (uint8_t *)pp; + p[0] = x & 0xff; + p[1] = (x >> 8) & 0xff; + p[2] = (x >> 16) & 0xff; + p[3] = (x >> 24) & 0xff; + } + #endif
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/30516a6ce8d723cc3d8eb624e2d30431843f01a0
script.h
Commit 2
- #include "bignum.h"
Include removed
+class scriptnum_error : public std::runtime_error +{ +public: + explicit scriptnum_error(const std::string& str) : std::runtime_error(str) {} +}; + +class CScriptNum +{ +// Numeric opcodes (OP_1ADD, etc) are restricted to operating on 4-byte integers. +// The semantics are subtle, though: operands must be in the range [-2^31 +1...2^31 -1], +// but results may overflow (and are valid as long as they are not used in a subsequent +// numeric operation). CScriptNum enforces those semantics by storing results as +// an int64 and allowing out-of-range values to be returned as a vector of bytes but +// throwing an exception if arithmetic is done or the result is interpreted as an integer. +public: + + explicit CScriptNum(const int64_t& n) + { + m_value = n; + } + + explicit CScriptNum(const std::vector<unsigned char>& vch) + { + if (vch.size() > nMaxNumSize) + throw scriptnum_error("CScriptNum(const std::vector<unsigned char>&) : overflow"); + m_value = set_vch(vch); + } + + inline bool operator==(const int64_t& rhs) const { return m_value == rhs; } + inline bool operator!=(const int64_t& rhs) const { return m_value != rhs; } + inline bool operator<=(const int64_t& rhs) const { return m_value <= rhs; } + inline bool operator< (const int64_t& rhs) const { return m_value < rhs; } + inline bool operator>=(const int64_t& rhs) const { return m_value >= rhs; } + inline bool operator> (const int64_t& rhs) const { return m_value > rhs; } + + inline bool operator==(const CScriptNum& rhs) const { return operator==(rhs.m_value); } + inline bool operator!=(const CScriptNum& rhs) const { return operator!=(rhs.m_value); } + inline bool operator<=(const CScriptNum& rhs) const { return operator<=(rhs.m_value); } + inline bool operator< (const CScriptNum& rhs) const { return operator< (rhs.m_value); } + inline bool operator>=(const CScriptNum& rhs) const { return operator>=(rhs.m_value); } + inline bool operator> (const CScriptNum& rhs) const { return operator> (rhs.m_value); } + + inline CScriptNum operator +( const int64_t& rhs) const { return CScriptNum(m_value + rhs);} + inline CScriptNum operator-( const int64_t& rhs) const { return CScriptNum(m_value - rhs);} + inline CScriptNum operator +( const CScriptNum& rhs) const { return operator +(rhs.m_value); } + inline CScriptNum operator-( const CScriptNum& rhs) const { return operator-(rhs.m_value); } + + inline CScriptNum& operator +=( const CScriptNum& rhs) { return operator +=(rhs.m_value); } + inline CScriptNum& operator-=( const CScriptNum& rhs) { return operator-=(rhs.m_value); } + + inline CScriptNum operator-() const + { + assert(m_value != std::numeric_limits<int64_t>::min()); + return CScriptNum(-m_value); + } + + inline CScriptNum& operator=( const int64_t& rhs) + { + m_value = rhs; + return *this; + } + + inline CScriptNum& operator +=( const int64_t& rhs) + { + assert(rhs == 0 || (rhs > 0 && m_value <= std::numeric_limits<int64_t>::max() - rhs) || + (rhs < 0 && m_value >= std::numeric_limits<int64_t>::min() - rhs)); + m_value += rhs; + return *this; + } + + inline CScriptNum& operator-=( const int64_t& rhs) + { + assert(rhs == 0 || (rhs > 0 && m_value >= std::numeric_limits<int64_t>::min() + rhs) || + (rhs < 0 && m_value <= std::numeric_limits<int64_t>::max() + rhs)); + m_value -= rhs; + return *this; + } + + int getint() const + { + if (m_value > std::numeric_limits<int>::max()) + return std::numeric_limits<int>::max(); + else if (m_value < std::numeric_limits<int>::min()) + return std::numeric_limits<int>::min(); + return m_value; + } + + std::vector<unsigned char> getvch() const + { + return serialize(m_value); + } + + static std::vector<unsigned char> serialize(const int64_t& value) + { + if(value == 0) + return std::vector<unsigned char>(); + + std::vector<unsigned char> result; + const bool neg = value < 0; + uint64_t absvalue = neg ? -value : value; + + while(absvalue) + { + result.push_back(absvalue & 0xff); + absvalue >>= 8; + } + + +// - If the most significant byte is >= 0x80 and the value is positive, push a +// new zero-byte to make the significant byte < 0x80 again. + +// - If the most significant byte is >= 0x80 and the value is negative, push a +// new 0x80 byte that will be popped off when converting to an integral. + +// - If the most significant byte is < 0x80 and the value is negative, add +// 0x80 to it, since it will be subtracted and interpreted as a negative when +// converting to an integral. + + if (result.back() & 0x80) + result.push_back(neg ? 0x80 : 0); + else if (neg) + result.back() |= 0x80; + + return result; + } + + static const size_t nMaxNumSize = 4; + +private: + static int64_t set_vch(const std::vector<unsigned char>& vch) + { + if (vch.empty()) + return 0; + + int64_t result = 0; + for (size_t i = 0; i != vch.size(); + +i) + result |= static_cast<int64_t>(vch[i]) << 8*i; + + // If the input vector's most significant byte is 0x80, remove it from + // the result's msb and return a negative. + if (vch.back() & 0x80) + return -(result & ~(0x80 << (8 * (vch.size() - 1)))); + + return result; + } + + int64_t m_value; +}; +
Scrypt interface change
+ SCRIPT_VERIFY_LOW_S = (1U << 2), // enforce low S values (<n/2) in signatures (depends on STRICTENC) + SCRIPT_VERIFY_NULLDUMMY = (1U << 4), // verify dummy stack item consumed by CHECKMULTISIG is of zero-length
Scrypt interface change Bitcoin code replaced.
+ return strprintf("%d", CScriptNum(vch).getint());
Print name interface change
- CBigNum bn(n); - *this << bn.getvch(); - - CScript& push_uint64(uint64_t n) - { - if (n >= 1 && n <= 16) - { - push_back(n + (OP_1 - 1)); - } - else - { - CBigNum bn(n); - *this << bn.getvch(); - } - return *this; - }
Bitcoin code removed
+ *this << CScriptNum::serialize(n); + CScript(int64_t b) { operator<<(b); }
Scrypt interface included
- //explicit CScript(char b) is not portable. Use 'signed char' or 'unsigned char'. - explicit CScript(signed char b) { operator<<(b); } - explicit CScript(short b) { operator<<(b); } - explicit CScript(int b) { operator<<(b); } - explicit CScript(long b) { operator<<(b); } - explicit CScript(long long b) { operator<<(b); } - explicit CScript(unsigned char b) { operator<<(b); } - explicit CScript(unsigned int b) { operator<<(b); } - explicit CScript(unsigned short b) { operator<<(b); } - explicit CScript(unsigned long b) { operator<<(b); } - explicit CScript(unsigned long long b) { operator<<(b); } -
Bitcoin code removed
+ CScript(int64_t b) { operator<<(b); }
Scrypt interface included
- explicit CScript(const CBigNum& b) { operator<<(b); }
Bitcoin code removed
+ explicit CScript(const CScriptNum& b) { operator<<(b); } + CScript& operator<<(int64_t b) { return push_int64(b); }
Scrypt interface added
- //CScript& operator<<(char b) is not portable. Use 'signed char' or 'unsigned char'. - CScript& operator<<(signed char b) { return push_int64(b); } - CScript& operator<<(short b) { return push_int64(b); } - CScript& operator<<(int b) { return push_int64(b); } - CScript& operator<<(long b) { return push_int64(b); } - CScript& operator<<(long long b) { return push_int64(b); } - CScript& operator<<(unsigned char b) { return push_uint64(b); } - CScript& operator<<(unsigned int b) { return push_uint64(b); } - CScript& operator<<(unsigned short b) { return push_uint64(b); } - CScript& operator<<(unsigned long b) { return push_uint64(b); } - CScript& operator<<(unsigned long long b) { return push_uint64(b); }
Bitcoin code removed
+ CScript& operator<<(int64_t b) { return push_int64(b); } + CScript& operator<<(const CScriptNum& b)
Scrypt interface added
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/900050b10fb9b56bea9d8dd664350a59adac73ab
scrypt-sse2.cpp
scrypt-sse2.cpp contains a number of Feathercoin settings , from Litecoin / Dogecoin? , for scrypt interface change Maintain separately / cherry pick?
Additional file to Bitcoin.
This could be specified as an alternate file at build time?
+ /* + * Copyright 2009 Colin Percival, 2011 ArtForz, 2012-2013 pooler + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * This file was originally written by Colin Percival as part of the Tarsnap + * online backup system. + */ + + // Copyright (c) 2013-2014 Dogecoin Developers + + #include "scrypt.h" + #include <stdlib.h> + #include <stdint.h> + #include <string.h> + #include <openssl/sha.h> + + #include <emmintrin.h> + + static inline void xor_salsa8_sse2(__m128i B[4], const __m128i Bx[4]) + { + __m128i X0, X1, X2, X3; + __m128i T; + int i; + + X0 = B[0] = _mm_xor_si128(B[0], Bx[0]); + X1 = B[1] = _mm_xor_si128(B[1], Bx[1]); + X2 = B[2] = _mm_xor_si128(B[2], Bx[2]); + X3 = B[3] = _mm_xor_si128(B[3], Bx[3]); + + for (i = 0; i < 8; i + = 2) { + /* Operate on "columns". */ + T = _mm_add_epi32(X0, X3); + X1 = _mm_xor_si128(X1, _mm_slli_epi32(T, 7)); + X1 = _mm_xor_si128(X1, _mm_srli_epi32(T, 25)); + T = _mm_add_epi32(X1, X0); + X2 = _mm_xor_si128(X2, _mm_slli_epi32(T, 9)); + X2 = _mm_xor_si128(X2, _mm_srli_epi32(T, 23)); + T = _mm_add_epi32(X2, X1); + X3 = _mm_xor_si128(X3, _mm_slli_epi32(T, 13)); + X3 = _mm_xor_si128(X3, _mm_srli_epi32(T, 19)); + T = _mm_add_epi32(X3, X2); + X0 = _mm_xor_si128(X0, _mm_slli_epi32(T, 18)); + X0 = _mm_xor_si128(X0, _mm_srli_epi32(T, 14)); + + /* Rearrange data. */ + X1 = _mm_shuffle_epi32(X1, 0x93); + X2 = _mm_shuffle_epi32(X2, 0x4E); + X3 = _mm_shuffle_epi32(X3, 0x39); + + /* Operate on "rows". */ + T = _mm_add_epi32(X0, X1); + X3 = _mm_xor_si128(X3, _mm_slli_epi32(T, 7)); + X3 = _mm_xor_si128(X3, _mm_srli_epi32(T, 25)); + T = _mm_add_epi32(X3, X0); + X2 = _mm_xor_si128(X2, _mm_slli_epi32(T, 9)); + X2 = _mm_xor_si128(X2, _mm_srli_epi32(T, 23)); + T = _mm_add_epi32(X2, X3); + X1 = _mm_xor_si128(X1, _mm_slli_epi32(T, 13)); + X1 = _mm_xor_si128(X1, _mm_srli_epi32(T, 19)); + T = _mm_add_epi32(X1, X2); + X0 = _mm_xor_si128(X0, _mm_slli_epi32(T, 18)); + X0 = _mm_xor_si128(X0, _mm_srli_epi32(T, 14)); + + /* Rearrange data. */ + X1 = _mm_shuffle_epi32(X1, 0x39); + X2 = _mm_shuffle_epi32(X2, 0x4E); + X3 = _mm_shuffle_epi32(X3, 0x93); + } + + B[0] = _mm_add_epi32(B[0], X0); + B[1] = _mm_add_epi32(B[1], X1); + B[2] = _mm_add_epi32(B[2], X2); + B[3] = _mm_add_epi32(B[3], X3); + } + + void scrypt_1024_1_1_256_sp_sse2(const char *input, char *output, char *scratchpad) + { + uint8_t B[128]; + union { + __m128i i128[8]; + uint32_t u32[32]; + } X; + __m128i *V; + uint32_t i, j, k; + + V = (__m128i *)(((uintptr_t)(scratchpad) + 63) & ~ (uintptr_t)(63)); + + PBKDF2_SHA256((const uint8_t *)input, 80, (const uint8_t *)input, 80, 1, B, 128); + + for (k = 0; k < 2; k + + ) { + for (i = 0; i < 16; i + + ) { + X.u32[k * 16 + i] = le32dec(&B[(k * 16 + (i * 5 % 16)) * 4]); + } + } + + for (i = 0; i < 1024; i + + ) { + for (k = 0; k < 8; k + + ) + V[i * 8 + k] = X.i128[k]; + xor_salsa8_sse2(&X.i128[0], &X.i128[4]); + xor_salsa8_sse2(&X.i128[4], &X.i128[0]); + } + for (i = 0; i < 1024; i + + ) { + j = 8 * (X.u32[16] & 1023); + for (k = 0; k < 8; k + + ) + X.i128[k] = _mm_xor_si128(X.i128[k], V[j + k]); + xor_salsa8_sse2(&X.i128[0], &X.i128[4]); + xor_salsa8_sse2(&X.i128[4], &X.i128[0]); + } + + for (k = 0; k < 2; k + + ) { + for (i = 0; i < 16; i + + ) { + le32enc(&B[(k * 16 + (i * 5 % 16)) * 4], X.u32[k * 16 + i]); + } + } + + PBKDF2_SHA256((const uint8_t *)input, 80, B, 128, 1, (uint8_t *)output, 32); + }
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/bbfe772b5ce815bb429e74443b7b0f02cdda3354
bitcoin.cpp
bitcoin.cpp contains a number of Feathercoin settings.
Review, could be specified as an alternate file at build time?
+/** Class encapsulating Feathercoin Core startup and shutdown.
Name change / new FTC file – for comment?
+/** Main Feathercoin application object */
Name change for comment?
+ QMessageBox::critical(0, "Runaway exception", BitcoinGUI::tr("A fatal error occurred. Feathercoin can no longer continue safely and will quit.") + QString("\n\n") + message);
Aren’t these all covered by displaying the translation text anyway? Review translations as Bitcoin -> Feathercoin message change. Does translatios stil fit or do they have to be bought in from Litecoin - how did Lizhi handle that?
+ WId BitcoinApplication::getMainWinId() const + { + if (!window) + return 0; + + return window->winId(); + } + + SetupEnvironment();
Code added, interface change.
+ + GUIUtil::SubstituteFonts(); +
Change from default font handling
+ QMessageBox::critical(0, QObject::tr("Feathercoin Core"),
Message box name change.
- ReadConfigFile(mapArgs, mapMultiArgs); + try { + ReadConfigFile(mapArgs, mapMultiArgs); + } catch(std::exception &e) { + QMessageBox::critical(0, QObject::tr("Feathercoin Core"), + QObject::tr("Error: Cannot parse configuration file: %1. Only use key=value syntax.").arg(e.what())); + return false; + }
Code replaced, scrypt interface.
+ QMessageBox::critical(0, QObject::tr("Feathercoin Core"), QObject::tr("Error: Invalid combination of -regtest and -testnet."));
Name change to Feathercoin in
+ // feathercoin: links repeatedly have their payment requests routed to this process:
Name change in a comment, review.
- // Install qDebug() message handler to route to debug.log #if QT_VERSION < 0x050000 + // Install qDebug() message handler to route to debug.log qInstallMsgHandler(DebugMessageHandler); #else + #if defined(Q_OS_WIN) + // Install global event filter for processing Windows session related Windows messages (WM_QUERYENDSESSION and WM_ENDSESSION) + qApp->installNativeEventFilter(new WinShutdownMonitor()); + #endif + // Install qDebug() message handler to route to debug.log
Debug interface change
+ #if defined(Q_OS_WIN) && QT_VERSION >= 0x050000 + WinShutdownMonitor::registerShutdownBlockReason(QObject::tr("Feathercoin Core didn't yet exit safely..."), (HWND)app.getMainWinId()); + #endif
Scrypt interface bug fix close down windoze ?
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/834f94ceae3ee86c25ceffab7f82a3e592c27471
qt/bitcoinstrings.cpp
qt/bitcoinstrings.cpp contains a number of Feathercoin settings.
Review, could be specified as an alternate file at build time?
+ "rpcuser=feathercoinrpc\n"
rpc user name change
+ "for example: alertnotify=echo %%s | mail -s \"Feathercoin Alert\" [email protected]\n"),
Name change in Password help text - needs review / translations?
+ "Cannot obtain a lock on data directory %s. Feathercoin Core is probably already "
Name change for comment? needs review / translations?
+"Continuously rate-limit free transactions to <n>*1000 bytes per minute " +"(default:15)"), +QT_TRANSLATE_NOOP("bitcoin-core", ""
Additional code interface? from scrypt?
+ "Fees smaller than this are considered zero fee (for transaction creation) " + "(default:"), + QT_TRANSLATE_NOOP("bitcoin-core", "" + "Flush database activity from memory pool to disk log every <n> megabytes " + "(default: 100)"), + QT_TRANSLATE_NOOP("bitcoin-core", "" + "How thorough the block verification of -checkblocks is (0-4, default: 3)"), + QT_TRANSLATE_NOOP("bitcoin-core", "" + "In this mode -genproclimit controls how many blocks are generated " + "immediately."), + QT_TRANSLATE_NOOP("bitcoin-core", "" + "Listen for JSON-RPC connections on <port> (default: 9336 or testnet: 19336)"),
From scrypt interface changes?
+ "Set the number of script verification threads (%u to %d, 0 = auto, <0 = " -"leave that many cores free, default: 0)"), + "leave that many cores free, default: %d)"), + QT_TRANSLATE_NOOP("bitcoin-core", "" + "Set the processor limit for when generation is on (-1 = unlimited, default: " + "-1)"),
scrypt interface change
+"Unable to bind to %s on this computer. Feathercoin Core is probably already " +"your clock is wrong Feathercoin will not work properly."),
Name change for error ? use translations?
+ QT_TRANSLATE_NOOP("bitcoin-core", "(default: 1)"), + QT_TRANSLATE_NOOP("bitcoin-core", "(default: wallet.dat)"),
Additions for scrypt interface change
+ QT_TRANSLATE_NOOP("bitcoin-core", "Feathercoin Core Daemon"), + QT_TRANSLATE_NOOP("bitcoin-core", "Feathercoin Core RPC client version"),
Name change to Feathercoin, review.
+ QT_TRANSLATE_NOOP("bitcoin-core", "Connect to JSON-RPC on <port> (default: 9336 or testnet: 19336)"),
Change default Port error messages.
Note (only translates for QT GUI?)
+QT_TRANSLATE_NOOP("bitcoin-core", "Connection options:"), +QT_TRANSLATE_NOOP("bitcoin-core", "Debugging/Testing options:"), +QT_TRANSLATE_NOOP("bitcoin-core", "Disable safemode, override a real safe mode event (default: 0)"),
Additional
+ QT_TRANSLATE_NOOP("bitcoin-core", "Error loading wallet.dat: Wallet requires newer version of Feathercoin"),
Replacement
+ QT_TRANSLATE_NOOP("bitcoin-core", "Fees smaller than this are considered zero fee (for relaying) (default:"), + QT_TRANSLATE_NOOP("bitcoin-core", "Force safe mode (default: 0)"), + QT_TRANSLATE_NOOP("bitcoin-core", "Importing..."), + QT_TRANSLATE_NOOP("bitcoin-core", "Limit size of signature cache to <n> entries (default: 50000)"),
Additional
+ QT_TRANSLATE_NOOP("bitcoin-core", "Listen for connections on <port> (default: 9337 or testnet: 19337)"),
Replacement
+ QT_TRANSLATE_NOOP("bitcoin-core", "Log transaction priority and fee per kB when mining blocks (default: 0)"), + QT_TRANSLATE_NOOP("bitcoin-core", "Print block on startup, if found in block index"), + QT_TRANSLATE_NOOP("bitcoin-core", "Print block tree on startup (default: 0)"), + QT_TRANSLATE_NOOP("bitcoin-core", "RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)"), + QT_TRANSLATE_NOOP("bitcoin-core", "RPC server options:"), + QT_TRANSLATE_NOOP("bitcoin-core", "Randomly drop 1 of every <n> network messages"), + QT_TRANSLATE_NOOP("bitcoin-core", "Randomly fuzz 1 of every <n> network messages"), + QT_TRANSLATE_NOOP("bitcoin-core", "Run a thread to flush wallet periodically (default: 1)"),
Additional
+ QT_TRANSLATE_NOOP("bitcoin-core", "Send command to Feathercoin Core"),
Replacement
+ QT_TRANSLATE_NOOP("bitcoin-core", "Sets the DB_PRIVATE flag in the wallet db environment (default: 1)"), + QT_TRANSLATE_NOOP("bitcoin-core", "Show all debugging options (usage: --help -help-debug)"), + QT_TRANSLATE_NOOP("bitcoin-core", "Show benchmark information (default: 0)"),
Additional
+ QT_TRANSLATE_NOOP("bitcoin-core", "Specify configuration file (default: feathercoin.conf)"), + QT_TRANSLATE_NOOP("bitcoin-core", "Specify pid file (default: feathercoind.pid)"), + QT_TRANSLATE_NOOP("bitcoin-core", "Start Feathercoin Core Daemon"), + QT_TRANSLATE_NOOP("bitcoin-core", "Usage (deprecated, use feathercoin-cli):"),
Replacement
+ QT_TRANSLATE_NOOP("bitcoin-core", "Wallet needed to be rewritten: restart Feathercoin to complete"),
Replacement
+QT_TRANSLATE_NOOP("bitcoin-core", "on startup"),
Additional
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/8aac39898d66645502f17fab7b50568e91a659ab
qt/Makefile.am
+ bin_PROGRAMS = feathercoin-qt
Name change to Feathercoin
+# feathercoin qt core #
Name change for a comment.
- locale/bitcoin_de_AT.ts \
Removed a translation local file
+ locale/bitcoin_mn.ts \
Added a translation file (from scrypt?) or FTC additions?
+ FEATHERCOIN_MM = \
Name change to interface _MM
+ QT_QRC_CPP = qrc_feathercoin.cpp + QT_QRC = feathercoin.qrc
Change reference to name changed files
+ walletview.h \ + winshutdownmonitor.h
Bitcoin code replaced
+ utilitydialog.cpp \ + winshutdownmonitor.cpp
Bitcoin code replaced
+ FEATHERCOIN_RC = res/feathercoin-qt-res.rc
replace feathercoin-qt-res.rc file name change
+ # feathercoin-qt binary # + feathercoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) \ + feathercoin_qt_SOURCES = bitcoin.cpp + feathercoin_qt_SOURCES += $(FEATHERCOIN_MM) + feathercoin_qt_SOURCES += $(FEATHERCOIN_RC) + feathercoin_qt_LDADD = libbitcoinqt.a $(LIBBITCOIN_SERVER) + feathercoin_qt_LDADD += $(LIBBITCOIN_WALLET) + feathercoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBLEVELDB) $(LIBMEMENV) \ + feathercoin_qt_LDFLAGS = $(QT_LDFLAGS)
Bitcoin code replaced.
+ translate: bitcoinstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(FEATHERCOIN_MM)
Name change to FTC _MM interface change.
- $(SED) -i.bak -e '/^\*\*.*Created:/d' $@ && rm [email protected] - $(SED) -i.bak -e '/^\*\*.*by:/d' $@ && rm [email protected]
Bitcoin code replaced.
+ $(SED) -e '/^\*\*.*Created:/d' $@ > [email protected] && mv $@{.n,} + $(SED) -e '/^\*\*.*by:/d' $@ > [email protected] && mv $@{.n,}
Feathercoin code ? from LTC?
[FAQ] What is SED?
sed is a stream editor. A stream editor is used to perform basic text transformations on an input stream (a file or input from a pipeline). While in some ways similar to an editor which permits scripted edits (such as ed), sed works by making only one pass over the input(s), and is consequently more efficient. But it is sed’s ability to filter text in a pipeline which particularly distinguishes it from other types of editors.
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/954813e6c9de92cc7755b4a4c847a107528a790f
qt/splashscreen.cpp
qt/splashscreen.cpp contains a number of Feathercoin settings changes.
Review, could be specified as an alternate file at build time?
+ QString titleText = tr("Feathercoin Core");
Name change to Feathercoin
+ QString copyrightText = QChar(0xA9)+QString(" 2013-%1 ").arg(COPYRIGHT_YEAR) + QString(tr("The Feathercoin Core developers"));
Automatic copyright date compiled for splash screen. Bitcoin code replaced.
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/b73a405176a5c15d297eda85fb3c2a5723dca0ae
qt/res/feathercoin-qt-res.rc
qt/res/feathercoin-qt-res.rc contains a number of Feathercoin settings changes. Feathercoin specific file name change.
+ IDI_ICON1 ICON DISCARDABLE "icons/bitcoin.ico" + IDI_ICON2 ICON DISCARDABLE "icons/bitcoin_testnet.ico" + + #include <windows.h> // needed for VERSIONINFO + #include "../../clientversion.h" // holds the needed client version information + + #define VER_PRODUCTVERSION CLIENT_VERSION_MAJOR,CLIENT_VERSION_MINOR,CLIENT_VERSION_REVISION,CLIENT_VERSION_BUILD + #define VER_PRODUCTVERSION_STR STRINGIZE(CLIENT_VERSION_MAJOR) "." STRINGIZE(CLIENT_VERSION_MINOR) "." STRINGIZE(CLIENT_VERSION_REVISION) "." STRINGIZE(CLIENT_VERSION_BUILD) + #define VER_FILEVERSION VER_PRODUCTVERSION + #define VER_FILEVERSION_STR VER_PRODUCTVERSION_STR + #define COPYRIGHT_STR "Feathercoin developers 2013-" STRINGIZE(COPYRIGHT_YEAR) ", The Bitcoin developers 2009-" STRINGIZE(COPYRIGHT_YEAR) + + VS_VERSION_INFO VERSIONINFO + FILEVERSION VER_FILEVERSION + PRODUCTVERSION VER_PRODUCTVERSION + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" // U.S. English - multilingual (hex) + BEGIN + VALUE "CompanyName", "Feathercoin" + VALUE "FileDescription", "Feathercoin Core (OSS GUI client for Feathercoin)" + VALUE "FileVersion", VER_FILEVERSION_STR + VALUE "InternalName", "feathercoin-qt" + VALUE "LegalCopyright", COPYRIGHT_STR + VALUE "LegalTrademarks1", "Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php." + VALUE "OriginalFilename", "feathercoin-qt.exe" + VALUE "ProductName", "Feathercoin Core" + VALUE "ProductVersion", VER_PRODUCTVERSION_STR + END + END + + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0, 1252 // language neutral - multilingual (decimal) + END + END
Review, could be specified as an alternate file at build time?
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/49cb289ae746ce7269d809f6e45988f785e6e6ac
src/qt/res/images/
qt/res/images/ contains a number of Feathercoin image file changes. Feathercoin specific file name change. Alternate solution FTC images directory / build option??
Check where each of these is being used?
src/qt/res/images/LOGO.png src/qt/res/images/mainbg.png src/qt/res/images/splash.png src/qt/res/images/splash_256.png
https://github.com/FeatherCoin/Feathercoin/commit/89e49238366fd9597ca3f8e5b2711f48e402372b
Commit 2
src/qt/res/images/about.png src/qt/res/images/about_bitcoin.png src/qt/res/images/splash.png src/qt/res/images/splash_bitcoin.png
https://github.com/FeatherCoin/Feathercoin/commit/516a78744d2eac208b61a864f81d59dc9055568d
src/qt/res/images/
3rd commit
src/qt/res/images/bitcoinbazaar.co.uk.png src/qt/res/images/btc-e.png src/qt/res/images/bter.png src/qt/res/images/cm.png src/qt/res/images/cryptsy.png src/qt/res/images/ct.png src/qt/res/images/feathercoinmap.png src/qt/res/images/mc.png src/qt/res/images/pockio.png src/qt/res/images/splash01.png
Note there are further commits.
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/4260da19879b05cd7823d0059e219a2f4c24ec80
src/qt/res/icons/
qt/res/icons/ contains a number of Feathercoin image file changes. Feathercoin specific file name change. Alternate solution FTC images directory / build option??
src/qt/res/icons/account-report.png src/qt/res/icons/bitcoin.ico src/qt/res/icons/bitcoin.png src/qt/res/icons/bitcoin_testnet.ico src/qt/res/icons/bitcoin_testnet.png
https://github.com/FeatherCoin/Feathercoin/commit/516a78744d2eac208b61a864f81d59dc9055568d
src/qt/res/icons/
2nd commit
src/qt/res/icons/merchantList.png src/qt/res/icons/toolbar.png src/qt/res/icons/toolbar_testnet.png
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
This file has been updated significantly in later commits. Review handling Readme and Docs directory customizations.
https://github.com/FeatherCoin/Feathercoin/commit/4260da19879b05cd7823d0059e219a2f4c24ec80
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/3527a5ffa10cda80fb9a2095c6ba394b7cb590ec
alert.h
Copyright
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/16820b0452399de8d66edf64dd9821aebb955a90
chainparams.h
No real changes, white space removed.
chainparams.h
Second commit to chainparams.h
https://github.com/FeatherCoin/Feathercoin/commit/38ea92e59f3ba01debbb3fd3eebb617ded985852
- //LogPrintf("Debug 1:hashGenesisBlock=%s",hashGenesisBlock.ToString().c_str()); - //LogPrintf("Debug 1:genesis.hashMerkleRoot=%s",genesis.hashMerkleRoot.ToString().c_str());
Debug interface removed .
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/3527a5ffa10cda80fb9a2095c6ba394b7cb590ec
src/qt/bitcoingui.cpp
+ QString windowTitle = tr("Feathercoin Core") + " - ";
Name change
+ optionsAction->setStatusTip(tr("Modify configuration options for Feathercoin"));
Message name change
- openAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_FileIcon), tr("Open &URI..."), this); - openAction->setStatusTip(tr("Open a bitcoin: URI or payment request"));
openAction interface change
+ openAction = new QAction(QIcon(":/icons/openurl"), tr("Open &URI..."), this); + openAction->setStatusTip(tr("Open a feathercoin: URI or payment request")); + showHelpMessageAction->setStatusTip(tr("Show the Feathercoin Core help message to get a list with possible Feathercoin command-line options")); + setNumBlocks(clientModel->getNumBlocks()); + connect(clientModel, SIGNAL(numBlocksChanged(int)), this, SLOT(setNumBlocks(int))); + trayIcon->setToolTip(tr("Feathercoin client")); + trayIcon->setToolTip(tr("Feathercoin client") + " " + tr("[testnet]")); + void BitcoinGUI::setNumBlocks(int count)
Bitcoin code replaced.
if(count < nTotalBlocks) + tooltip = tr("Processed %1 blocks of transaction history.").arg(count); - { - tooltip = tr("Processed %1 of %2 (estimated) blocks of transaction history.").arg(count).arg(nTotalBlocks); - } - else - { - tooltip = tr("Processed %1 blocks of transaction history.").arg(count);
Tooltip interface change?
// Set icon state: spinning if catching up, tick otherwise - if(secs < 90*60 && count >= nTotalBlocks) + if(secs < 90*60)
If conditions changed.
https://github.com/FeatherCoin/Feathercoin/commit/30516a6ce8d723cc3d8eb624e2d30431843f01a0
src/qt/bitcoingui.cpp
Second commit
+ sendCoinsAction->setStatusTip(tr("Send coins to a Feathercoin address")); + receiveCoinsAction->setStatusTip(tr("Request payments (generates QR codes and feathercoin: URIs)"));
Tip status interface change
src/qt/bitcoingui.cpp
Third commit
+ + QPalette palette; + palette.setBrush(QPalette::Background,QBrush(QPixmap(":/images/mainbg"))); + this->setPalette(palette); + this->setAutoFillBackground(true);
Palette code addition
+ + accountReportAction = new QAction(QIcon(":/icons/account-report"), tr("&Report"), this); + accountReportAction->setStatusTip(tr("Get my account report")); + accountReportAction->setToolTip(accountReportAction->statusTip()); + accountReportAction->setCheckable(true); + accountReportAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_5)); + tabGroup->addAction(accountReportAction);
Tooltips interface change
+ connect(accountReportAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); + connect(accountReportAction, SIGNAL(triggered()), this, SLOT(gotoAccountReportPage()));
Code addition
+ aboutAction = new QAction(QIcon(":/icons/bitcoin"), tr("&About Feathercoin Core"), this); + aboutAction = new QAction(QIcon(":/icons/bitcoin_testnet"), tr("&About Feathercoin Core"), this); + aboutAction->setStatusTip(tr("Show information about Feathercoin")); + signMessageAction->setStatusTip(tr("Sign messages with your Feathercoin addresses to prove you own them")); + verifyMessageAction->setStatusTip(tr("Verify messages to ensure they were signed with specified Feathercoin addresses"));
Interface name change. Bitcoin code replaced
+ toolbar->addAction(accountReportAction); + accountReportAction->setEnabled(enabled);
Code added
+void BitcoinGUI::gotoAccountReportPage() +{ + accountReportAction->setChecked(true); + if (walletFrame) walletFrame->gotoAccountReportPage(); +} +
Code added scrypt interface
+ labelConnectionsIcon->setToolTip(tr("%n active connection(s) to Feathercoin network", "", count)); + QString strTitle = tr("Feathercoin"); // default title
Bitcoin Code replaced scrypt interface
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/3527a5ffa10cda80fb9a2095c6ba394b7cb590ec
src/qt/bitcoinunits.cpp
+ unitlist.append(FTC); + unitlist.append(mFTC); + unitlist.append(uFTC); + case FTC: + case mFTC: + case uFTC: + case FTC: return QString("FTC"); + case mFTC: return QString("mFTC"); + case uFTC: return QString::fromUtf8("μFTC");
Bitcoin code replaced. Not in translations or Public variable?
+ case FTC: return QString("Feathercoins"); + case mFTC: return QString("Milli-Feathercoins (1 / 1,000)"); + case uFTC: return QString("Micro-Feathercoins (1 / 1,000,000)"); + case FTC: return 100000000; + case mFTC: return 100000; + case uFTC: return 100; + case FTC: return Q_INT64_C(336000000); + case mFTC: return Q_INT64_C(336000000000); + case uFTC: return Q_INT64_C(336000000000000); + case FTC: return 9; // 336,000,000 (# digits, without commas) + case mFTC: return 12; // 336,000,000,000 + case uFTC: return 15; // 336,000,000,000,000 + case FTC: return 8; + case mFTC: return 5; + case uFTC: return 2;
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/3527a5ffa10cda80fb9a2095c6ba394b7cb590ec
src/qt/bitcoinunits.h
+ FTC, + mFTC, + uFTC
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/3527a5ffa10cda80fb9a2095c6ba394b7cb590ec
src/qt/coincontroldialog.cpp
+ int nDisplayUnit = BitcoinUnits::FTC;
Name change coins FTC
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/3527a5ffa10cda80fb9a2095c6ba394b7cb590ec
src/qt/feathercoin.qrc
maintain feathercoin version of file? from LTC?
+ <!DOCTYPE RCC><RCC version="1.0"> + <qresource prefix="/icons"> + <file alias="bitcoin">res/icons/bitcoin.png</file> + <file alias="openurl">res/icons/openurl.png</file> + <file alias="address-book">res/icons/address-book.png</file> + <file alias="quit">res/icons/quit.png</file> + <file alias="send">res/icons/send.png</file> + <file alias="toolbar">res/icons/toolbar.png</file> + <file alias="connect_0">res/icons/connect0_16.png</file> + <file alias="connect_1">res/icons/connect1_16.png</file> + <file alias="connect_2">res/icons/connect2_16.png</file> + <file alias="connect_3">res/icons/connect3_16.png</file> + <file alias="connect_4">res/icons/connect4_16.png</file> + <file alias="transaction_0">res/icons/transaction0.png</file> + <file alias="transaction_confirmed">res/icons/transaction2.png</file> + <file alias="transaction_conflicted">res/icons/transaction_conflicted.png</file> + <file alias="transaction_1">res/icons/clock1.png</file> + <file alias="transaction_2">res/icons/clock2.png</file> + <file alias="transaction_3">res/icons/clock3.png</file> + <file alias="transaction_4">res/icons/clock4.png</file> + <file alias="transaction_5">res/icons/clock5.png</file> + <file alias="options">res/icons/configure.png</file> + <file alias="receiving_addresses">res/icons/receive.png</file> + <file alias="editpaste">res/icons/editpaste.png</file> + <file alias="editcopy">res/icons/editcopy.png</file> + <file alias="add">res/icons/add.png</file> + <file alias="bitcoin_testnet">res/icons/bitcoin_testnet.png</file> + <file alias="toolbar_testnet">res/icons/toolbar_testnet.png</file> + <file alias="edit">res/icons/edit.png</file> + <file alias="history">res/icons/history.png</file> + <file alias="overview">res/icons/overview.png</file> + <file alias="export">res/icons/export.png</file> + <file alias="synced">res/icons/synced.png</file> + <file alias="remove">res/icons/remove.png</file> + <file alias="tx_mined">res/icons/tx_mined.png</file> + <file alias="tx_input">res/icons/tx_input.png</file> + <file alias="tx_output">res/icons/tx_output.png</file> + <file alias="tx_inout">res/icons/tx_inout.png</file> + <file alias="lock_closed">res/icons/lock_closed.png</file> + <file alias="lock_open">res/icons/lock_open.png</file> + <file alias="key">res/icons/key.png</file> + <file alias="filesave">res/icons/filesave.png</file> + <file alias="qrcode">res/icons/qrcode.png</file> + <file alias="debugwindow">res/icons/debugwindow.png</file> + </qresource> + <qresource prefix="/images"> + <file alias="about">res/images/about.png</file> + <file alias="splash">res/images/splash.png</file> + <file alias="splash_testnet">res/images/splash_testnet.png</file> + </qresource> + <qresource prefix="/movies"> + <file alias="spinner-000">res/movies/spinner-000.png</file> + <file alias="spinner-001">res/movies/spinner-001.png</file> + <file alias="spinner-002">res/movies/spinner-002.png</file> + <file alias="spinner-003">res/movies/spinner-003.png</file> + <file alias="spinner-004">res/movies/spinner-004.png</file> + <file alias="spinner-005">res/movies/spinner-005.png</file> + <file alias="spinner-006">res/movies/spinner-006.png</file> + <file alias="spinner-007">res/movies/spinner-007.png</file> + <file alias="spinner-008">res/movies/spinner-008.png</file> + <file alias="spinner-009">res/movies/spinner-009.png</file> + <file alias="spinner-010">res/movies/spinner-010.png</file> + <file alias="spinner-011">res/movies/spinner-011.png</file> + <file alias="spinner-012">res/movies/spinner-012.png</file> + <file alias="spinner-013">res/movies/spinner-013.png</file> + <file alias="spinner-014">res/movies/spinner-014.png</file> + <file alias="spinner-015">res/movies/spinner-015.png</file> + <file alias="spinner-016">res/movies/spinner-016.png</file> + <file alias="spinner-017">res/movies/spinner-017.png</file> + <file alias="spinner-018">res/movies/spinner-018.png</file> + <file alias="spinner-019">res/movies/spinner-019.png</file> + <file alias="spinner-020">res/movies/spinner-020.png</file> + <file alias="spinner-021">res/movies/spinner-021.png</file> + <file alias="spinner-022">res/movies/spinner-022.png</file> + <file alias="spinner-023">res/movies/spinner-023.png</file> + <file alias="spinner-024">res/movies/spinner-024.png</file> + <file alias="spinner-025">res/movies/spinner-025.png</file> + <file alias="spinner-026">res/movies/spinner-026.png</file> + <file alias="spinner-027">res/movies/spinner-027.png</file> + <file alias="spinner-028">res/movies/spinner-028.png</file> + <file alias="spinner-029">res/movies/spinner-029.png</file> + <file alias="spinner-030">res/movies/spinner-030.png</file> + <file alias="spinner-031">res/movies/spinner-031.png</file> + <file alias="spinner-032">res/movies/spinner-032.png</file> + <file alias="spinner-033">res/movies/spinner-033.png</file> + <file alias="spinner-034">res/movies/spinner-034.png</file> + </qresource> + <qresource prefix="/translations"> + <file alias="ach">locale/bitcoin_ach.qm</file> + <file alias="af_ZA">locale/bitcoin_af_ZA.qm</file> + <file alias="ar">locale/bitcoin_ar.qm</file> + <file alias="be_BY">locale/bitcoin_be_BY.qm</file> + <file alias="bg">locale/bitcoin_bg.qm</file> + <file alias="bs">locale/bitcoin_bs.qm</file> + <file alias="ca_ES">locale/bitcoin_ca_ES.qm</file> + <file alias="ca">locale/bitcoin_ca.qm</file> + <file alias="ca@valencia">locale/[email protected]</file> + <file alias="cmn">locale/bitcoin_cmn.qm</file> + <file alias="cs">locale/bitcoin_cs.qm</file> + <file alias="cy">locale/bitcoin_cy.qm</file> + <file alias="da">locale/bitcoin_da.qm</file> + <file alias="de">locale/bitcoin_de.qm</file> + <file alias="el_GR">locale/bitcoin_el_GR.qm</file> + <file alias="en">locale/bitcoin_en.qm</file> + <file alias="eo">locale/bitcoin_eo.qm</file> + <file alias="es_CL">locale/bitcoin_es_CL.qm</file> + <file alias="es_DO">locale/bitcoin_es_DO.qm</file> + <file alias="es_MX">locale/bitcoin_es_MX.qm</file> + <file alias="es">locale/bitcoin_es.qm</file> + <file alias="es_UY">locale/bitcoin_es_UY.qm</file> + <file alias="et">locale/bitcoin_et.qm</file> + <file alias="eu_ES">locale/bitcoin_eu_ES.qm</file> + <file alias="fa_IR">locale/bitcoin_fa_IR.qm</file> + <file alias="fa">locale/bitcoin_fa.qm</file> + <file alias="fi">locale/bitcoin_fi.qm</file> + <file alias="fr_CA">locale/bitcoin_fr_CA.qm</file> + <file alias="fr">locale/bitcoin_fr.qm</file> + <file alias="gl">locale/bitcoin_gl.qm</file> + <file alias="gu_IN">locale/bitcoin_gu_IN.qm</file> + <file alias="he">locale/bitcoin_he.qm</file> + <file alias="hi_IN">locale/bitcoin_hi_IN.qm</file> + <file alias="hr">locale/bitcoin_hr.qm</file> + <file alias="hu">locale/bitcoin_hu.qm</file> + <file alias="id_ID">locale/bitcoin_id_ID.qm</file> + <file alias="it">locale/bitcoin_it.qm</file> + <file alias="ja">locale/bitcoin_ja.qm</file> + <file alias="ka">locale/bitcoin_ka.qm</file> + <file alias="kk_KZ">locale/bitcoin_kk_KZ.qm</file> + <file alias="ko_KR">locale/bitcoin_ko_KR.qm</file> + <file alias="ky">locale/bitcoin_ky.qm</file> + <file alias="la">locale/bitcoin_la.qm</file> + <file alias="lt">locale/bitcoin_lt.qm</file> + <file alias="lv_LV">locale/bitcoin_lv_LV.qm</file> + <file alias="mn">locale/bitcoin_mn.qm</file> + <file alias="ms_MY">locale/bitcoin_ms_MY.qm</file> + <file alias="nb">locale/bitcoin_nb.qm</file> + <file alias="nl">locale/bitcoin_nl.qm</file> + <file alias="pam">locale/bitcoin_pam.qm</file> + <file alias="pl">locale/bitcoin_pl.qm</file> + <file alias="pt_BR">locale/bitcoin_pt_BR.qm</file> + <file alias="pt_PT">locale/bitcoin_pt_PT.qm</file> + <file alias="ro_RO">locale/bitcoin_ro_RO.qm</file> + <file alias="ru">locale/bitcoin_ru.qm</file> + <file alias="sah">locale/bitcoin_sah.qm</file> + <file alias="sk">locale/bitcoin_sk.qm</file> + <file alias="sl_SI">locale/bitcoin_sl_SI.qm</file> + <file alias="sq">locale/bitcoin_sq.qm</file> + <file alias="sr">locale/bitcoin_sr.qm</file> + <file alias="sv">locale/bitcoin_sv.qm</file> + <file alias="th_TH">locale/bitcoin_th_TH.qm</file> + <file alias="tr">locale/bitcoin_tr.qm</file> + <file alias="uk">locale/bitcoin_uk.qm</file> + <file alias="ur_PK">locale/bitcoin_ur_PK.qm</file> + <file alias="uz@Cyrl">locale/[email protected]</file> + <file alias="vi">locale/bitcoin_vi.qm</file> + <file alias="vi_VN">locale/bitcoin_vi_VN.qm</file> + <file alias="zh_CN">locale/bitcoin_zh_CN.qm</file> + <file alias="zh_HK">locale/bitcoin_zh_HK.qm</file> + <file alias="zh_TW">locale/bitcoin_zh_TW.qm</file> + </qresource> +</RCC> - }
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/3527a5ffa10cda80fb9a2095c6ba394b7cb590ec
src/qt/guiutil.cpp
+#if defined(Q_OS_MAC) +extern double NSAppKitVersionNumber; +#if !defined(NSAppKitVersionNumber10_9) +#define NSAppKitVersionNumber10_9 1265 +#endif +#endif +
Small change in bigger file.
+ #if QT_VERSION >= 0x040800 + font.setStyleHint(QFont::Monospace); + #else font.setStyleHint(QFont::TypeWriter); +#endif
Typeface change?
if(!BitcoinUnits::parse(BitcoinUnits::FTC, i->second, &rv.amount))
FTC name interface change
+ ret += QString("?amount=%1").arg(BitcoinUnits::format(BitcoinUnits::FTC, info.amount));
Name change to FTC
+void SubstituteFonts() +{ +#if defined(Q_OS_MAC) +// Background: +// OSX's default font changed in 10.9 and QT is unable to find it with its +// usual fallback methods when building against the 10.7 sdk or lower. +// The 10.8 SDK added a function to let it find the correct fallback font. +// If this fallback is not properly loaded, some characters may fail to +// render correctly. +// +// Solution: If building with the 10.7 SDK or lower and the user's platform +// is 10.9 or higher at runtime, substitute the correct font. This needs to +// happen before the QApplication is created. +#if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_8 + if (floor(NSAppKitVersionNumber) >= NSAppKitVersionNumber10_9) + QFont::insertSubstitution(".Lucida Grande UI", "Lucida Grande"); +#endif +#endif +} +
OSX update scrypt related? from Litecoin?
+#elif defined(Q_OS_LINUX)
End extra if
https://github.com/FeatherCoin/Feathercoin/commit/30516a6ce8d723cc3d8eb624e2d30431843f01a0
src/qt/guiutil.cpp
Second commit
+ widget->setPlaceholderText(QObject::tr("Enter a Feathercoin address (e.g. 6djzFXtrfK8axEpEhSPe5o7YgJ16gFjSw7)"));
name interface change
+ // Convert feathercoin:// to feathercoin: + // Cannot handle this later, because feathercoin:// will cause Qt to see the part after // as host,
comments updated
+ if(uri.startsWith("feathercoin://", Qt::CaseInsensitive)) + uri.replace(0, 13, "feathercoin:"); + QString ret = QString("feathercoin:%1").arg(info.address); + return GetSpecialFolderPath(CSIDL_STARTUP) / "Feathercoin.lnk"; + return GetAutostartDir() / "feathercoin.desktop";