Forum Home
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular

    [Dev] Documenting Feathercoin Specific Software settings - Part 17

    Technical Development
    1
    50
    8343
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • wrapper
      wrapper Moderators last edited by

      Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*

      Initial work on tests allowing the test app to build. :: commit

      Work on tests allowing the test app to build.

      Correct issues with unit tests due to interface and new code variables etc.

      https://github.com/FeatherCoin/Feathercoin/commit/dcbb5df357a8a079ef3e21f1508c7ac0231654dc

      src/test/scriptnum_tests.cpp

      New file

       +// Copyright (c) 2012-2014 The Bitcoin Core developers
       +// Distributed under the MIT/X11 software license, see the accompanying
       +// file COPYING or http://www.opensource.org/licenses/mit-license.php.
       +
       +#include "bignum.h"
       +#include "script.h"
       +#include <boost/test/unit_test.hpp>
       +#include <limits.h>
       +#include <stdint.h>
       +BOOST_AUTO_TEST_SUITE(scriptnum_tests)
       +
       +static const int64_t values[] = \
       +{ 0, 1, CHAR_MIN, CHAR_MAX, UCHAR_MAX, SHRT_MIN, USHRT_MAX, INT_MIN, INT_MAX, UINT_MAX, LONG_MIN, LONG_MAX };
       +static const int64_t offsets[] = { 1, 0x79, 0x80, 0x81, 0xFF, 0x7FFF, 0x8000, 0xFFFF, 0x10000};
       +
       +static bool verify(const CBigNum& bignum, const CScriptNum& scriptnum)
       +{
       +    return bignum.getvch() == scriptnum.getvch() && bignum.getint() == scriptnum.getint();
       +}
       +
       +static void CheckCreateVch(const int64_t& num)
       +{
       +    CBigNum bignum(num);
       +    CScriptNum scriptnum(num);
       +    BOOST_CHECK(verify(bignum, scriptnum));
       +
       +    CBigNum bignum2(bignum.getvch());
       +    CScriptNum scriptnum2(scriptnum.getvch());
       +    BOOST_CHECK(verify(bignum2, scriptnum2));
       +
       +    CBigNum bignum3(scriptnum2.getvch());
       +    CScriptNum scriptnum3(bignum2.getvch());
       +    BOOST_CHECK(verify(bignum3, scriptnum3));
       +}
       +
       +static void CheckCreateInt(const int64_t& num)
       +{
       +    CBigNum bignum(num);
       +    CScriptNum scriptnum(num);
       +    BOOST_CHECK(verify(bignum, scriptnum));
       +    BOOST_CHECK(verify(bignum.getint(), CScriptNum(scriptnum.getint())));
       +    BOOST_CHECK(verify(scriptnum.getint(), CScriptNum(bignum.getint())));
       +    BOOST_CHECK(verify(CBigNum(scriptnum.getint()).getint(), CScriptNum(CScriptNum(bignum.getint()).getint())));
       +}
       +
       +
       +static void CheckAdd(const int64_t& num1, const int64_t& num2)
       +{
       +    const CBigNum bignum1(num1);
       +    const CBigNum bignum2(num2);
       +    const CScriptNum scriptnum1(num1);
       +    const CScriptNum scriptnum2(num2);
       +    CBigNum bignum3(num1);
       +    CBigNum bignum4(num1);
       +    CScriptNum scriptnum3(num1);
       +    CScriptNum scriptnum4(num1);
       +
       +    // int64_t overflow is undefined.
       +    bool invalid = (((num2 > 0) && (num1 > (std::numeric_limits<int64_t>::max() - num2))) ||
       +                    ((num2 < 0) && (num1 < (std::numeric_limits<int64_t>::min() - num2))));
       +    if (!invalid)
       +    {
       +        BOOST_CHECK(verify(bignum1 + bignum2, scriptnum1 + scriptnum2));
       +        BOOST_CHECK(verify(bignum1 + bignum2, scriptnum1 + num2));
       +        BOOST_CHECK(verify(bignum1 + bignum2, scriptnum2 + num1));
       +    }
       +}
       +
       +static void CheckNegate(const int64_t& num)
       +{
       +    const CBigNum bignum(num);
       +    const CScriptNum scriptnum(num);
       +
       +    // -INT64_MIN is undefined
       +    if (num != std::numeric_limits<int64_t>::min())
       +        BOOST_CHECK(verify(-bignum, -scriptnum));
       +}
       +
       +static void CheckSubtract(const int64_t& num1, const int64_t& num2)
       +{
       +    const CBigNum bignum1(num1);
       +    const CBigNum bignum2(num2);
       +    const CScriptNum scriptnum1(num1);
       +    const CScriptNum scriptnum2(num2);
       +    bool invalid = false;
       +
       +    // int64_t overflow is undefined.
       +    invalid = ((num2 > 0 && num1 < std::numeric_limits<int64_t>::min() + num2) ||
       +               (num2 < 0 && num1 > std::numeric_limits<int64_t>::max() + num2));
       +    if (!invalid)
       +    {
       +        BOOST_CHECK(verify(bignum1 - bignum2, scriptnum1 - scriptnum2));
       +        BOOST_CHECK(verify(bignum1 - bignum2, scriptnum1 - num2));
       +    }
       +
       +    invalid = ((num1 > 0 && num2 < std::numeric_limits<int64_t>::min() + num1) ||
       +               (num1 < 0 && num2 > std::numeric_limits<int64_t>::max() + num1));
       +    if (!invalid)
       +    {
       +        BOOST_CHECK(verify(bignum2 - bignum1, scriptnum2 - scriptnum1));
       +        BOOST_CHECK(verify(bignum2 - bignum1, scriptnum2 - num1));
       +    }
       +}
       +
       +static void CheckCompare(const int64_t& num1, const int64_t& num2)
       +{
       +    const CBigNum bignum1(num1);
       +    const CBigNum bignum2(num2);
       +    const CScriptNum scriptnum1(num1);
       +    const CScriptNum scriptnum2(num2);
       +
       +    BOOST_CHECK((bignum1 == bignum1) == (scriptnum1 == scriptnum1));
       +    BOOST_CHECK((bignum1 != bignum1) ==  (scriptnum1 != scriptnum1));
       +    BOOST_CHECK((bignum1 < bignum1) ==  (scriptnum1 < scriptnum1));
       +    BOOST_CHECK((bignum1 > bignum1) ==  (scriptnum1 > scriptnum1));
       +    BOOST_CHECK((bignum1 >= bignum1) ==  (scriptnum1 >= scriptnum1));
       +    BOOST_CHECK((bignum1 <= bignum1) ==  (scriptnum1 <= scriptnum1));
       +
       +    BOOST_CHECK((bignum1 == bignum1) == (scriptnum1 == num1));
       +    BOOST_CHECK((bignum1 != bignum1) ==  (scriptnum1 != num1));
       +    BOOST_CHECK((bignum1 < bignum1) ==  (scriptnum1 < num1));
       +    BOOST_CHECK((bignum1 > bignum1) ==  (scriptnum1 > num1));
       +    BOOST_CHECK((bignum1 >= bignum1) ==  (scriptnum1 >= num1));
       +    BOOST_CHECK((bignum1 <= bignum1) ==  (scriptnum1 <= num1));
       +
       +    BOOST_CHECK((bignum1 == bignum2) ==  (scriptnum1 == scriptnum2));
       +    BOOST_CHECK((bignum1 != bignum2) ==  (scriptnum1 != scriptnum2));
       +    BOOST_CHECK((bignum1 < bignum2) ==  (scriptnum1 < scriptnum2));
       +    BOOST_CHECK((bignum1 > bignum2) ==  (scriptnum1 > scriptnum2));
       +    BOOST_CHECK((bignum1 >= bignum2) ==  (scriptnum1 >= scriptnum2));
       +    BOOST_CHECK((bignum1 <= bignum2) ==  (scriptnum1 <= scriptnum2));
       +
       +    BOOST_CHECK((bignum1 == bignum2) ==  (scriptnum1 == num2));
       +    BOOST_CHECK((bignum1 != bignum2) ==  (scriptnum1 != num2));
       +    BOOST_CHECK((bignum1 < bignum2) ==  (scriptnum1 < num2));
       +    BOOST_CHECK((bignum1 > bignum2) ==  (scriptnum1 > num2));
       +    BOOST_CHECK((bignum1 >= bignum2) ==  (scriptnum1 >= num2));
       +    BOOST_CHECK((bignum1 <= bignum2) ==  (scriptnum1 <= num2));
       +}
       +
       +static void RunCreate(const int64_t& num)
       +{
       +    CheckCreateInt(num);
       +    CScriptNum scriptnum(num);
       +    if (scriptnum.getvch().size() <= CScriptNum::nMaxNumSize)
       +        CheckCreateVch(num);
       +    else
       +    {
       +        BOOST_CHECK_THROW (CheckCreateVch(num), scriptnum_error);
       +    }
       +}
       +
       +static void RunOperators(const int64_t& num1, const int64_t& num2)
       +{
       +    CheckAdd(num1, num2);
       +    CheckSubtract(num1, num2);
       +    CheckNegate(num1);
       +    CheckCompare(num1, num2);
       +}
       +
       +BOOST_AUTO_TEST_CASE(creation)
       +{
       +    for(size_t i = 0; i < sizeof(values) / sizeof(values[0]); ++i)
       +    {
       +        for(size_t j = 0; j < sizeof(offsets) / sizeof(offsets[0]); ++j)
       +        {
       +            RunCreate(values[i]);
       +            RunCreate(values[i] + offsets[j]);
       +            RunCreate(values[i] - offsets[j]);
       +        }
       +    }
       +}
       +
       +BOOST_AUTO_TEST_CASE(operators)
       +{
       +    for(size_t i = 0; i < sizeof(values) / sizeof(values[0]); ++i)
       +    {
       +        for(size_t j = 0; j < sizeof(offsets) / sizeof(offsets[0]); ++j)
       +        {
       +            RunOperators(values[i], values[i]);
       +            RunOperators(values[i], -values[i]);
       +            RunOperators(values[i], values[j]);
       +            RunOperators(values[i], -values[j]);
       +            RunOperators(values[i] + values[j], values[j]);
       +            RunOperators(values[i] + values[j], -values[j]);
       +            RunOperators(values[i] - values[j], values[j]);
       +            RunOperators(values[i] - values[j], -values[j]);
       +            RunOperators(values[i] + values[j], values[i] + values[j]);
       +            RunOperators(values[i] + values[j], values[i] - values[j]);
       +            RunOperators(values[i] - values[j], values[i] + values[j]);
       +            RunOperators(values[i] - values[j], values[i] - values[j]);
       +        }
       +    }
       +}
       +
       +BOOST_AUTO_TEST_SUITE_END()
      

      Code added

      1 Reply Last reply Reply Quote 0
      • wrapper
        wrapper Moderators last edited by

        Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*

        Initial work on tests allowing the test app to build. :: commit

        Work on tests allowing the test app to build.

        Correct issues with unit tests due to interface and new code variables etc.

        https://github.com/FeatherCoin/Feathercoin/commit/dcbb5df357a8a079ef3e21f1508c7ac0231654dc

        src/test/sigopcount_tests.cpp

        -    std::vector<CPubKey> keys;
        
        +    std::vector<CKey> keys;
        

        Code replaced

         -        keys.push_back(k.GetPubKey());
        
         +        keys.push_back(k);
        

        Code replaced

        1 Reply Last reply Reply Quote 0
        • wrapper
          wrapper Moderators last edited by

          Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*

          Initial work on tests allowing the test app to build. :: commit

          Work on tests allowing the test app to build.

          Correct issues with unit tests due to interface and new code variables etc.

          https://github.com/FeatherCoin/Feathercoin/commit/dcbb5df357a8a079ef3e21f1508c7ac0231654dc

          src/test/transaction_tests.cpp

           +    LOCK(cs_main);
          

          Code added

          1 Reply Last reply Reply Quote 0
          • wrapper
            wrapper Moderators last edited by

            Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*

            Initial work on tests allowing the test app to build. :: commit

            Work on tests allowing the test app to build.

            Correct issues with unit tests due to interface and new code variables etc.

            https://github.com/FeatherCoin/Feathercoin/commit/dcbb5df357a8a079ef3e21f1508c7ac0231654dc

            src/test/util_tests.cpp

             -/*These are platform-dependant and thus removed to avoid useless test failures
            
             -    // Formats used within Bitcoin
            

            Code / comments removed

             +    BOOST_CHECK_EQUAL(DateTimeStrFormat("%a, %d %b %Y %H:%M:%S +0000", 1317425777), "Fri, 30 Sep 2011 23:36:17 +0000");
            

            Code added

             -    BOOST_CHECK(strprintf("%s %d %s", B, s64t, E) == B" -9223372036854775807 "E);
             +    BOOST_CHECK(strprintf("%s %d %s", B, s64t, E) == B" -9223372036854775807 " E);
            
             -    BOOST_CHECK(strprintf("%s %u %s", B, u64t, E) == B" 18446744073709551615 "E);
             +    BOOST_CHECK(strprintf("%s %u %s", B, u64t, E) == B" 18446744073709551615 " E);
            
             -    BOOST_CHECK(strprintf("%s %x %s", B, u64t, E) == B" ffffffffffffffff "E);
             +    BOOST_CHECK(strprintf("%s %x %s", B, u64t, E) == B" ffffffffffffffff " E);
            
            
             size_t st = 12345678; /* unsigned size_t test value */
             ssize_t sst = -12345678; /* signed size_t test value */
            
             -    BOOST_CHECK(strprintf("%s %"PRIszd" %s", B, sst, E) == B" -12345678 "E);
             +    BOOST_CHECK(strprintf("%s %d %s", B, sst, E) == B" -12345678 " E);
             -    BOOST_CHECK(strprintf("%s %"PRIszu" %s", B, st, E) == B" 12345678 "E);
             +    BOOST_CHECK(strprintf("%s %u %s", B, st, E) == B" 12345678 " E);
             -    BOOST_CHECK(strprintf("%s %"PRIszx" %s", B, st, E) == B" bc614e "E);
             +    BOOST_CHECK(strprintf("%s %x %s", B, st, E) == B" bc614e " E);
            
            
             ptrdiff_t pt = 87654321; /* positive ptrdiff_t test value */
             ptrdiff_t spt = -87654321; /* negative ptrdiff_t test value */
            
             -    BOOST_CHECK(strprintf("%s %"PRIpdd" %s", B, spt, E) == B" -87654321 "E);
             +    BOOST_CHECK(strprintf("%s %d %s", B, spt, E) == B" -87654321 " E);
            
             -    BOOST_CHECK(strprintf("%s %"PRIpdu" %s", B, pt, E) == B" 87654321 "E);
             +    BOOST_CHECK(strprintf("%s %u %s", B, pt, E) == B" 87654321 " E);
            
             -    BOOST_CHECK(strprintf("%s %"PRIpdx" %s", B, pt, E) == B" 5397fb1 "E);
             +    BOOST_CHECK(strprintf("%s %x %s", B, pt, E) == B" 5397fb1 " E);
            

            Code replaced

            1 Reply Last reply Reply Quote 0
            • wrapper
              wrapper Moderators last edited by wrapper

              Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*

              Initial work on tests allowing the test app to build. :: commit

              Work on tests allowing the test app to build.

              Correct issues with unit tests due to interface and new code variables etc.

              https://github.com/FeatherCoin/Feathercoin/commit/dcbb5df357a8a079ef3e21f1508c7ac0231654dc

              src/wallet.cpp

               +        printf("Stealth send to generated pubkey %" PRIszu ": %s\n", pkSendTo.size(), HexStr(pkSendTo).c_str());
              
               +        printf("ephem_pubkey %" PRIszu ": %s\n", ephem_pubkey.size(), HexStr(ephem_pubkey).c_str());
              
              
               +                LogPrintf("pkExtracted=%" PRIszu ":%s\n", pkExtracted.size(), HexStr(pkExtracted).c_str());//为空
              
               +                LogPrintf("pkExtracted= %" PRIszu ": %s\n", pkExtracted.size(), HexStr(pkExtracted).c_str());//pkOut
              

              Code replaced space / padding

              1 Reply Last reply Reply Quote 0
              • wrapper
                wrapper Moderators last edited by

                Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*

                Update Unix build instructions to inclide openSSL build from scratch :: commit

                https://github.com/FeatherCoin/Feathercoin/commit/46366fc62cba1ddb37520c4d23c84c703b2408f6

                doc/README.md

                 +
                 +### Build Feathercoin using  openSSL  from source
                 +
                 +cd ~/Feathercoin/
                 +mkdir openSSL
                 +cd openSSL
                 +wget https://www.openssl.org/source/openssl-1.0.1l.tar.gz
                 +tar zxvf openssl-1.0.1l.tar.gz
                 +cd openssl-1.0.1l
                 +export CFLAGS="-fPIC"
                 +./config --prefix=~/Feathercoin/openSSL/build shared enable-ec enable-ecdh enable-ecdsa -lanl -ldl
                 +sudo make
                 +sudo make install
                 +
                 +
                 +**Build with custom openSSL builds**
                 +
                 +cd /Feathercoin
                 +
                 +make clean
                 +
                 +./autogen.sh
                 +
                 +./configure --prefix=/home/aciddude/Feathercoin/build CPPFLAGS="-I${BDB_PREFIX}/include/ -O2" LDFLAGS="-L${BDB_PREFIX}/lib/" PKG_CONFIG_PATH=/home/aciddude/Feathercoin/openSSL/build/lib/pkgconfig LIBS=-Wl,-rpath=/home/aciddude/Feathercoin/openSSL/build/lib --disable-tests SSL_LIBS="/home/aciddude/Feathercoin/openSSL/build/lib/libssl.a /home/aciddude/Feathercoin/openSSL/build/lib/libcrypto.a -ldl" --with-gui
                 +
                 +time make
                 +
                 +sudo make install
                 +
                 +
                

                Code added

                1 Reply Last reply Reply Quote 0
                • wrapper
                  wrapper Moderators last edited by

                  Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*

                  Final fix for build tests :: commit

                  Work on tests allowing the test app to build.

                  Correct issues with unit tests due to interface and new code variables etc.

                  https://github.com/FeatherCoin/Feathercoin/commit/2d17002e704eeeb05cbd14dc57e7b91482f31f3f

                  src/test/base58_tests.cpp

                   +            CSecret privkey(exp_payload.begin(), exp_payload.end());
                                CKey key;
                  
                   -            CSecret secret2;
                  
                   +            key.SetSecret(privkey, isCompressed);
                  
                   -            key.SetSecret(secret2); 
                   -            secret.SetSecret(secret2, isCompressed);
                   -            BOOST_CHECK_MESSAGE(secret.ToString() == exp_base58string, "result mismatch: " + strTest);
                  
                   +            bool fCompressed=false;
                   +            secret.SetSecret(privkey, isCompressed);
                   +            BOOST_CHECK_MESSAGE(secret.ToString().c_str() == exp_base58string, "result mismatch: " + strTest);
                       }
                       }
                   +        
                  

                  Code replaced

                  1 Reply Last reply Reply Quote 0
                  • wrapper
                    wrapper Moderators last edited by

                    Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*

                    Final fix for build tests :: commit

                    Work on tests allowing the test app to build.

                    Correct issues with unit tests due to interface and new code variables etc.

                    https://github.com/FeatherCoin/Feathercoin/commit/2d17002e704eeeb05cbd14dc57e7b91482f31f3f

                    src/test/data/base58_keys_valid.json

                      -        "5nYxd8Vcb5CwwSZzeYkLf2UHrHbet1QqDzbZDjx1h2kP6k9RJms", 
                     +        "5njpn1dGnyhduB3Hog2tCoYcAS3XUg9F1saQAcKJbbpy2FszZcR", 
                    
                     -        "C862A03EE716826803C17C8A0F82B86D250FB63A5044A01F906F860878E26079", 
                     +        "E10E0E8270779EE90D3577C1AD767645933DAE88AD7049FFF17D259865BD327E", 
                    

                    Code replaced

                    1 Reply Last reply Reply Quote 0
                    • wrapper
                      wrapper Moderators last edited by

                      Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*

                      Final fix for build tests :: commit

                      Work on tests allowing the test app to build.

                      Correct issues with unit tests due to interface and new code variables etc.

                      https://github.com/FeatherCoin/Feathercoin/commit/2d17002e704eeeb05cbd14dc57e7b91482f31f3f

                      src/test/key_tests.cpp

                       -        "5nYxd8Vcb5CwwSZzeYkLf2UHrHbet1QqDzbZDjx1h2kP6k9RJms", 
                       +        "5njpn1dGnyhduB3Hog2tCoYcAS3XUg9F1saQAcKJbbpy2FszZcR", 
                      
                       -         "C862A03EE716826803C17C8A0F82B86D250FB63A5044A01F906F860878E26079", 
                       +        "E10E0E8270779EE90D3577C1AD767645933DAE88AD7049FFF17D259865BD327E", 
                      

                      Code replaced

                      1 Reply Last reply Reply Quote 0
                      • wrapper
                        wrapper Moderators last edited by

                        Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*

                        Final fix for build tests :: commit

                        Work on tests allowing the test app to build.

                        Correct issues with unit tests due to interface and new code variables etc.

                        https://github.com/FeatherCoin/Feathercoin/commit/2d17002e704eeeb05cbd14dc57e7b91482f31f3f

                        src/test/key_tests.cpp

                         -    key1C.SetSecret(secret1C);
                        
                         +    key1C.SetSecret(secret1C, fCompressed);
                        

                        Code replaced

                         -    key2C.SetSecret(secret2C);
                        
                         +    key2C.SetSecret(secret2C, fCompressed);
                        

                        Code replaced

                        1 Reply Last reply Reply Quote 0
                        • wrapper
                          wrapper Moderators last edited by

                          Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*

                          Final fix for build tests :: commit

                          Work on tests allowing the test app to build.

                          Correct issues with unit tests due to interface and new code variables etc.

                          https://github.com/FeatherCoin/Feathercoin/commit/2d17002e704eeeb05cbd14dc57e7b91482f31f3f

                          src/test/main_tests.cpp

                            -    for (int nHeight = 0; nHeight < 14000000; nHeight += 1000) {
                          
                           +    for (int nHeight = 0; nHeight < 21000000; nHeight += 1000) {
                          

                          Code replaced

                           -    BOOST_CHECK(nSum == 2099999997690000ULL);
                          
                           +    BOOST_CHECK_EQUAL(nSum, 33581578125000000ULL);
                          

                          Code replaced

                          1 Reply Last reply Reply Quote 0
                          • wrapper
                            wrapper Moderators last edited by

                            Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*

                            Final fix for build tests :: commit

                            Work on tests allowing the test app to build.

                            Correct issues with unit tests due to interface and new code variables etc.

                            https://github.com/FeatherCoin/Feathercoin/commit/2d17002e704eeeb05cbd14dc57e7b91482f31f3f

                            src/test/transaction_tests.cpp

                             -    t.vout[0].nValue = 501; // dust
                             +    t.vout[0].nValue = 5011; // dust
                            
                             -    BOOST_CHECK(!IsStandardTx(t, reason));
                             +    // Feathercoin does not enforce isDust().  Per dust fees are considered sufficient as deterrant.
                             +    // BOOST_CHECK(!IsStandardTx(t, reason));
                            

                            Code replaced

                             -    t.vout[0].nValue = 601; // not dust
                            
                             +    t.vout[0].nValue = 6011; // not dust
                            

                            Code replaced

                            1 Reply Last reply Reply Quote 0
                            • wrapper
                              wrapper Moderators last edited by

                              Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*

                              Removed legacy test :: commit

                              Work on tests allowing the test app to build.

                              Correct issues with unit tests due to interface and new code variables etc.

                              https://github.com/FeatherCoin/Feathercoin/commit/921d7eb2a9d53ade7c991420fe888a903a471e69

                              src/test/Makefile.am

                               -  alert_tests.cpp \
                              
                               -  bloom_tests.cpp \
                              
                              -  miner_tests.cpp \
                              

                              Code removed

                              1 Reply Last reply Reply Quote 0
                              • wrapper
                                wrapper Moderators last edited by

                                Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*

                                Fixed calculation / block reward :: commit

                                Work on tests allowing the test app to build.

                                Correct issues with unit tests due to interface and new code variables etc.

                                https://github.com/FeatherCoin/Feathercoin/commit/963769e83cfe95710807508462058e03ccc4a38a

                                src/test/main_tests.cpp

                                 -    for (int nHeight = 0; nHeight < 21000000; nHeight += 1000) {
                                 +    for (int nHeight = 0 ; nHeight < 204638; nHeight += 1000) {
                                
                                     uint64_t nSubsidy = GetBlockValue(nHeight, 0);
                                     BOOST_CHECK(nSubsidy <= 200 * COIN);
                                     nSum += nSubsidy * 1000;
                                     BOOST_CHECK(MoneyRange(nSum));
                                 }
                                 -    BOOST_CHECK_EQUAL(nSum, 33581578125000000ULL);
                                
                                 +    for (int nHeight = 204639 ; nHeight < 23919999; nHeight += 1000) {
                                 +        uint64_t nSubsidy = GetBlockValue(nHeight, 0);
                                 +        BOOST_CHECK(nSubsidy <= 80 * COIN);
                                 +        nSum  += nSubsidy * 1000;
                                 +        BOOST_CHECK(MoneyRange(nSum));
                                 +    }
                                 +    BOOST_CHECK_EQUAL(nSum, 33599996093750000ULL);
                                

                                Code replaced

                                1 Reply Last reply Reply Quote 0
                                • wrapper
                                  wrapper Moderators last edited by wrapper

                                  Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*

                                  Update docs - copying zxing to source directory :: commit

                                  https://github.com/FeatherCoin/Feathercoin/commit/963769e83cfe95710807508462058e03ccc4a38a

                                  doc/README.md

                                   +
                                   +Copy the zxing headers directory back to Feathercoin source.
                                   +
                                   +From:
                                   +    /usr/include/zxing
                                   +    
                                   +To:
                                   +    ~/Feathercoin/src/zxing    
                                   +    
                                  

                                  Code added

                                   +Copy the zxing directory to Feathercoin/src, this time it will be located :
                                   +
                                   +    /usr/local/include/zxing
                                  

                                  Code added

                                  1 Reply Last reply Reply Quote 0
                                  • wrapper
                                    wrapper Moderators last edited by

                                    Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*

                                    Update docs - copying zxing to source directory :: commit

                                    https://github.com/FeatherCoin/Feathercoin/commit/2e15d4966f40c2d9cb4d919ff9d43f38bee4812b

                                    doc/README.md

                                     -./configure --prefix=/home/aciddude/Feathercoin/build CPPFLAGS="-I${BDB_PREFIX}/include/ -O2" LDFLAGS="-L${BDB_PREFIX}/lib/" PKG_CONFIG_PATH=/home/aciddude/Feathercoin/openSSL/build/lib/pkgconfig LIBS=-Wl,-rpath=/home/aciddude/Feathercoin/openSSL/build/lib --disable-tests SSL_LIBS="/home/aciddude/Feathercoin/openSSL/build/lib/libssl.a /home/aciddude/Feathercoin/openSSL/build/lib/libcrypto.a -ldl" --with-gui
                                    
                                     +./configure --prefix=/home/USER/Feathercoin/build CPPFLAGS="-I${BDB_PREFIX}/include/ -O2" LDFLAGS="-L${BDB_PREFIX}/lib/" PKG_CONFIG_PATH=/home/USER/Feathercoin/openSSL/build/lib/pkgconfig LIBS=-Wl,-rpath=/home/USER/Feathercoin/openSSL/build/lib --disable-tests SSL_LIBS="/home/USER/Feathercoin/openSSL/build/lib/libssl.a /home/USERe/Feathercoin/openSSL/build/lib/libcrypto.a -ldl" --with-gui
                                    

                                    Code replaced

                                     +### Problems building with moc
                                     +
                                     +If you get a moc error:
                                     +
                                     +error: #error "This file was generated using the moc from 4.8.7.
                                     +
                                     +If you get :
                                     +
                                     +Qt Meta Object Compiler version 63 (Qt 4.8.7)
                                     +
                                     +Reset moc to Qt5:
                                     +
                                     +export QT_SELECT=5
                                     +moc -version
                                     +
                                     +check anaconda is in the path .bashrc . It can install an old moc.
                                    

                                    MOC error help code added

                                    1 Reply Last reply Reply Quote 0
                                    • wrapper
                                      wrapper Moderators last edited by

                                      Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*

                                      Updated DMG background png and psd :: commit

                                      https://github.com/FeatherCoin/Feathercoin/commit/7e8b516a579bbb6371381aafb1709d54b32eac08

                                      contrib/macdeploy/*

                                        contrib/macdeploy/background.png
                                      
                                        contrib/macdeploy/background.psd
                                      

                                      Additional files?

                                      1 Reply Last reply Reply Quote 0
                                      • wrapper
                                        wrapper Moderators last edited by

                                        Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*

                                        adjusted icon arrangement when building DMG with Make Deploy :: commit

                                        https://github.com/FeatherCoin/Feathercoin/commit/5398105ed5c5e656cfc5884ca0d9d7225137ef11

                                        contrib/macdeploy/fancy.plist

                                         +		<integer>720</integer>
                                        

                                        Example of layout changes

                                        1 Reply Last reply Reply Quote 0
                                        • wrapper
                                          wrapper Moderators last edited by wrapper

                                          Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*

                                          First Travis File :: commit

                                          Travis experiment was not fully completed for this release, regressed later

                                          Auto build system.

                                          Travis CI is a hosted, distributed continuous integration service used to build and test projects hosted at GitHub. Travis CI automatically detects when a commit has been made and pushed to a GitHub repository that is using Travis CI, and each time this happens, it will try to build the project and run tests.

                                          https://github.com/FeatherCoin/Feathercoin/commit/c33987dec1f4a9bb4b7d9a715ab2dcf99888af61

                                          .travis.yml

                                          New file added

                                           +# errata:
                                           +# - A travis bug causes caches to trample eachother when using the same
                                           +#   compiler key (which we don't use anyway). This is worked around for now by
                                           +#   replacing the "compilers" with a build name prefixed by the no-op ":"
                                           +#   command. See: https://github.com/travis-ci/travis-ci/issues/4393
                                           +# - sudo/dist/group are set so as to get Blue Box VMs, necessary for [loopback]
                                           +#   IPv6 support
                                           +
                                           +sudo: required
                                           +dist: precise
                                           +group: legacy
                                           +
                                           +os: linux
                                           +language: cpp
                                           +compiler: gcc
                                           +env:
                                           +  global:
                                           +    - MAKEJOBS=-j3
                                           +    - RUN_TESTS=false
                                           +    - CCACHE_SIZE=100M
                                           +    - CCACHE_TEMPDIR=/tmp/.ccache-temp
                                           +    - CCACHE_COMPRESS=1
                                           +    - BASE_OUTDIR=$TRAVIS_BUILD_DIR/out
                                           +    - SDK_URL=https://bitcoincore.org/depends-sources/sdks
                                           +cache:
                                           +  apt: true
                                           +  directories:
                                           +  - depends/built
                                           +  - depends/sdk-sources
                                           +  - $HOME/.ccache
                                           +matrix:
                                           +  fast_finish: true
                                           +  include:
                                           +    - compiler: ": ARM"
                                           +      env: HOST=arm-linux-gnueabihf PACKAGES="g++-arm-linux-gnueabihf" DEP_OPTS="NO_QT=1" GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat"
                                           +    - compiler: ": feathercoind"
                                           +      env: HOST=x86_64-unknown-linux-gnu PACKAGES="bc" DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat CPPFLAGS=-DDEBUG_LOCKORDER"
                                           +    - compiler: ": No wallet"
                                           +      env: HOST=x86_64-unknown-linux-gnu DEP_OPTS="NO_WALLET=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat"
                                           +    - compiler: ": 32-bit      + dash"
                                           +      env: HOST=i686-pc-linux-gnu PACKAGES="g++-multilib bc" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat" USE_SHELL="/bin/dash"
                                           +    - compiler: ": Cross-Mac"
                                           +      env: HOST=x86_64-apple-darwin11 PACKAGES="gcc-multilib g++-multilib cmake libcap-dev libz-dev libbz2-dev" OSX_SDK=10.7 GOAL="deploy"
                                           +    - compiler: ": Win64"
                                           +      env: HOST=x86_64-w64-mingw32 PACKAGES="nsis gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 binutils-mingw-w64-x86-64 mingw-w64-dev wine bc" RUN_TESTS=true GOAL="deploy" BITCOIN_CONFIG="--enable-gui" MAKEJOBS="-j2"
                                           +    - compiler: ": Win32"
                                           +      env: HOST=i686-w64-mingw32 PACKAGES="nsis gcc-mingw-w64-i686 g++-mingw-w64-i686 binutils-mingw-w64-i686 mingw-w64-dev wine bc" RUN_TESTS=true GOAL="deploy" BITCOIN_CONFIG="--enable-gui" MAKEJOBS="-j2"
                                           +  exclude:
                                           +    - compiler: gcc
                                           +install:
                                           +    - if [ -n "$PACKAGES" ]; then travis_retry sudo apt-get update; fi
                                           +    - if [ -n "$PACKAGES" ]; then travis_retry sudo apt-get install --no-install-recommends --no-upgrade -qq $PACKAGES; fi
                                           +before_script:
                                           +    - unset CC; unset CXX
                                           +    - mkdir -p depends/SDKs depends/sdk-sources
                                           +    - if [ -n "$OSX_SDK" -a ! -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then curl --location --fail $SDK_URL/MacOSX${OSX_SDK}.sdk.tar.gz -o depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz; fi
                                           +    - if [ -n "$OSX_SDK" -a -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then tar -C depends/SDKs -xf depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz; fi
                                           +    - make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS
                                           +script:
                                           +    - if [ -n "$USE_SHELL" ]; then export CONFIG_SHELL="$USE_SHELL"; fi
                                           +    - OUTDIR=$BASE_OUTDIR/$TRAVIS_PULL_REQUEST/$TRAVIS_JOB_NUMBER-$HOST
                                           +    - BITCOIN_CONFIG_ALL="--disable-dependency-tracking --prefix=$TRAVIS_BUILD_DIR/depends/$HOST --bindir=$OUTDIR/bin --libdir=$OUTDIR/lib"
                                           +    - depends/$HOST/native/bin/ccache --max-size=$CCACHE_SIZE
                                           +    - if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then export CCACHE_READONLY=1; fi
                                           +    - test -n "$USE_SHELL" && eval '"$USE_SHELL" -c "./autogen.sh"' || ./autogen.sh
                                           +    - ./configure --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
                                           +    - make distdir PACKAGE=bitcoin VERSION=$HOST
                                           +    - cd bitcoin-$HOST
                                           +    - ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
                                           +    - make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && make $GOAL V=1 ; false )
                                           +    - export LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib
                                           +    - if [ "$RUN_TESTS" = "true" ]; then make check; fi
                                           +    - if [ "$RUN_TESTS" = "true" ]; then qa/pull-tester/rpc-tests.sh; fi
                                           +after_script:
                                           +    - if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then (echo "Upload goes here. Something like: scp -r $BASE_OUTDIR server" || echo "upload failed"); fi
                                          
                                          1 Reply Last reply Reply Quote 0
                                          • wrapper
                                            wrapper Moderators last edited by

                                            Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*

                                            First Travis File :: commit

                                            Update Unix example build for zxing with additional switch settings which improve build (success) consistency

                                            https://github.com/FeatherCoin/Feathercoin/commit/ca94836e07dcb539313e8e290231b4066d0d7fd3

                                            doc/README.md

                                             +    export CXXFLAGS="-fPIC"
                                             -    cmake -G 'Unix Makefiles' .. -DCMAKE_BUILD_TYPE=Release       
                                            
                                            +    cmake -G "Unix Makefiles" -DCMAKE_CXX_FLAGS="-fPIC  D_GLIBCXX_USE_CXX11_ABI=1" -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=11 -DCMAKE_CXX_STANDARD_REQUIRED=ON ..
                                            

                                            Code replaced

                                             +Copy the zxing directory to ~/Feathercoin/src, this time it will be located :
                                            

                                            Code replaced

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post