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

    [Dev] Documenting Feathercoin Specific Software settings - Part 17

    Technical Development
    1
    50
    8608
    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/qt/walletmodel.cpp

       -  LogPrintf("pkSendTo= %"PRIszu": %s\n", pkSendTo.size(), HexStr(pkSendTo).c_str());//pkOut
       +  LogPrintf("pkSendTo= %" PRIszu ": %s\n", pkSendTo.size(), HexStr(pkSendTo).c_str());//pkOut
      

      Code replaced

        -   LogPrintf("pkSendTo= %"PRIszu": %s\n", pkSendTo.size(), HexStr(pkSendTo).c_str());//pkOut
       +   LogPrintf("pkSendTo= %" PRIszu ": %s\n", pkSendTo.size(), HexStr(pkSendTo).c_str());//pkOut
      

      Code replaced, padding

       -  LogPrintf("Stealth send to generated pubkey,pkSendTo= %"PRIszu": %s\n", pkSendTo.size(), HexStr(pkSendTo).c_str());
      +   LogPrintf("Stealth send to generated pubkey,pkSendTo= %" PRIszu ": %s\n", pkSendTo.size(), HexStr(pkSendTo).c_str());
      

      Code replaced, padding

       -  LogPrintf("enerate ephem public key,ephem_pubkey= %"PRIszu": %s\n", ephem_pubkey.size(), HexStr(ephem_pubkey).c_str());
       +  LogPrintf("enerate ephem public key,ephem_pubkey= %" PRIszu ": %s\n", ephem_pubkey.size(), HexStr(ephem_pubkey).c_str());
      

      Code replaced, 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.*

        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/Checkpoints_tests.cpp

         -    uint256 p11111 = uint256("0x0000000069e244f73d78e8fd29ba2fd2ed618bd6fa2ee92559f542fdb26e7c1d");
         +    uint256 p1 = uint256("0xfdbe99b90c90bae7505796461471d89ae8388ab953997aa06a355bbda8d915cb");
        
         -    uint256 p134444 = uint256("0x00000000000005b12ffd4cd315cd34ffd4a594f430ac814c91184a0d42d2b0fe");
         +    uint256 p41300 = uint256("0x8c4e02f6c0d20e856fd7e952a147fee30ce145ca6932a284f354924362d2b408");
        
         -    BOOST_CHECK(Checkpoints::CheckBlock(11111, p11111));
         +    BOOST_CHECK(Checkpoints::CheckBlock(1, p1));
        
         -    BOOST_CHECK(Checkpoints::CheckBlock(134444, p134444));
         +    BOOST_CHECK(Checkpoints::CheckBlock(41300, p41300));
         
         // Wrong hashes at checkpoints should fail:
         -    BOOST_CHECK(!Checkpoints::CheckBlock(11111, p134444));
         +    BOOST_CHECK(!Checkpoints::CheckBlock(1, p41300));
        
         -    BOOST_CHECK(!Checkpoints::CheckBlock(134444, p11111));
         +    BOOST_CHECK(!Checkpoints::CheckBlock(41300, p1));
        
        
              // ... but any hash not at a checkpoint should succeed:
        
         -    BOOST_CHECK(Checkpoints::CheckBlock(11111+1, p134444));
         +    BOOST_CHECK(Checkpoints::CheckBlock(1+1, p41300));
        
         -    BOOST_CHECK(Checkpoints::CheckBlock(134444+1, p11111));
         +    BOOST_CHECK(Checkpoints::CheckBlock(41300+1, p1));
        
        
         -    BOOST_CHECK(Checkpoints::GetTotalBlocksEstimate() >= 134444);
         +    BOOST_CHECK(Checkpoints::GetTotalBlocksEstimate() >= 40000);
          }    
        

        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/test/DoS_tests.cpp

           // Tests this internal-to-main.cpp method:
           -extern bool AddOrphanTx(const CTransaction& tx);
          
           +extern bool AddOrphanTx(const CTransaction& tx, NodeId peer);
           +extern void EraseOrphansFor(NodeId peer);
          

          Code replaced

           -        AddOrphanTx(tx);
          
           +        AddOrphanTx(tx, i);
          

          Code replaced

           -        BOOST_CHECK(!AddOrphanTx(tx));
          
           +        BOOST_CHECK(!AddOrphanTx(tx, i));
           +    }
           +
           +    // Test EraseOrphansFor:
           +    for (NodeId i = 0; i < 3; i++)
           +    {
           +        size_t sizeBefore = mapOrphanTransactions.size();
           +        EraseOrphansFor(i);
           +        BOOST_CHECK(mapOrphanTransactions.size() < sizeBefore);
          

          Code replaced

           -        AddOrphanTx(tx);
          
           +        AddOrphanTx(tx, 0);
          

          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/Makefile.am

             +  scriptnum_tests.cpp \
            

            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/README.md

               +# Notes
               +The sources in this directory are unit test cases.  Boost includes a
               +unit testing framework, and since bitcoin already uses boost, it makes
               +sense to simply use this framework rather than require developers to
               +configure some other framework (we want as few impediments to creating
               +unit tests as possible).
               +
               +The build system is setup to compile an executable called "test_bitcoin"
               +that runs all of the unit tests.  The main source file is called
               +test_bitcoin.cpp, which simply includes other files that contain the
               +actual unit tests (outside of a couple required preprocessor
               +directives).  The pattern is to create one test file for each class or
               +source file for which you want to create unit tests.  The file naming
               +convention is "<source_filename>_tests.cpp" and such files should wrap
               +their tests in a test suite called "<source_filename>_tests".  For an
               +examples of this pattern, examine uint160_tests.cpp and
               +uint256_tests.cpp.
               +
               +For further reading, I found the following website to be helpful in
               +explaining how the boost unit test framework works:
               +[http://www.alittlemadness.com/2009/03/31/c-unit-testing-with-boosttest/](http://www.alittlemadness.com/2009/03/31/c-unit-testing-with-boosttest/).
              

              Code text 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/alert_tests.cpp

                File removed?

                 -// Copyright (c) 2013 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.
                 -
                 -//
                 -// Unit tests for alert system
                 -//
                 -
                 -#include "alert.h"
                 -#include "data/alertTests.raw.h"
                 -
                 -#include "serialize.h"
                 -#include "util.h"
                 -#include "version.h"
                 -
                 -#include <fstream>
                 -
                 -#include <boost/filesystem/operations.hpp>
                 -#include <boost/foreach.hpp>
                 -#include <boost/test/unit_test.hpp>
                 -
                 -#if 0
                 -//
                 -// alertTests contains 7 alerts, generated with this code:
                 -// (SignAndSave code not shown, alert signing key is secret)
                 -//
                 -{
                 -    CAlert alert;
                 -    alert.nRelayUntil   = 60;
                 -    alert.nExpiration   = 24 * 60 * 60;
                 -    alert.nID           = 1;
                 -    alert.nCancel       = 0;   // cancels previous messages up to this ID number
                 -    alert.nMinVer       = 0;  // These versions are protocol versions
                 -    alert.nMaxVer       = 999001;
                 -    alert.nPriority     = 1;
                 -    alert.strComment    = "Alert comment";
                 -    alert.strStatusBar  = "Alert 1";
                 -
                 -    SignAndSave(alert, "test/alertTests");
                 -
                 -    alert.setSubVer.insert(std::string("/Satoshi:0.1.0/"));
                 -    alert.strStatusBar  = "Alert 1 for Satoshi 0.1.0";
                 -    SignAndSave(alert, "test/alertTests");
                 -
                 -    alert.setSubVer.insert(std::string("/Satoshi:0.2.0/"));
                 -    alert.strStatusBar  = "Alert 1 for Satoshi 0.1.0, 0.2.0";
                 -    SignAndSave(alert, "test/alertTests");
                 -
                 -    alert.setSubVer.clear();
                 -    ++alert.nID;
                 -    alert.nCancel = 1;
                 -    alert.nPriority = 100;
                 -    alert.strStatusBar  = "Alert 2, cancels 1";
                 -    SignAndSave(alert, "test/alertTests");
                 -
                 -    alert.nExpiration += 60;
                 -    ++alert.nID;
                 -    SignAndSave(alert, "test/alertTests");
                 -
                 -    ++alert.nID;
                 -    alert.nMinVer = 11;
                 -    alert.nMaxVer = 22;
                 -    SignAndSave(alert, "test/alertTests");
                 -
                 -    ++alert.nID;
                 -    alert.strStatusBar  = "Alert 2 for Satoshi 0.1.0";
                 -    alert.setSubVer.insert(std::string("/Satoshi:0.1.0/"));
                 -    SignAndSave(alert, "test/alertTests");
                 -
                 -    ++alert.nID;
                 -    alert.nMinVer = 0;
                 -    alert.nMaxVer = 999999;
                 -    alert.strStatusBar  = "Evil Alert'; /bin/ls; echo '";
                 -    alert.setSubVer.clear();
                 -    SignAndSave(alert, "test/alertTests");
                 -}
                 -#endif
                 -
                 -struct ReadAlerts
                 -{
                 -    ReadAlerts()
                 -    {
                 -        std::vector<unsigned char> vch(alert_tests::alertTests, alert_tests::alertTests + sizeof(alert_tests::alertTests));
                 -        CDataStream stream(vch, SER_DISK, CLIENT_VERSION);
                 -        try {
                 -            while (stream.good())
                 -            {
                 -                CAlert alert;
                 -                stream >> alert;
                 -                alerts.push_back(alert);
                 -            }
                 -        }
                 -        catch (std::exception) { }
                 -    }
                 -    ~ReadAlerts() { }
                 -
                 -    static std::vector<std::string> read_lines(boost::filesystem::path filepath)
                 -    {
                 -        std::vector<std::string> result;
                 -
                 -        std::ifstream f(filepath.string().c_str());
                 -        std::string line;
                 -        while (std::getline(f,line))
                 -            result.push_back(line);
                 -
                 -        return result;
                 -    }
                 -
                 -    std::vector<CAlert> alerts;
                 -};
                 -
                 -BOOST_FIXTURE_TEST_SUITE(Alert_tests, ReadAlerts)
                 -
                 -
                 -BOOST_AUTO_TEST_CASE(AlertApplies)
                 -{
                 -    SetMockTime(11);
                 -
                 -    BOOST_FOREACH(const CAlert& alert, alerts)
                 -    {
                 -        BOOST_CHECK(alert.CheckSignature());
                 -    }
                 -
                 -    BOOST_CHECK(alerts.size() >= 3);
                 -
                 -    // Matches:
                 -    BOOST_CHECK(alerts[0].AppliesTo(1, ""));
                 -    BOOST_CHECK(alerts[0].AppliesTo(999001, ""));
                 -    BOOST_CHECK(alerts[0].AppliesTo(1, "/Satoshi:11.11.11/"));
                 -
                 -    BOOST_CHECK(alerts[1].AppliesTo(1, "/Satoshi:0.1.0/"));
                 -    BOOST_CHECK(alerts[1].AppliesTo(999001, "/Satoshi:0.1.0/"));
                 -
                 -    BOOST_CHECK(alerts[2].AppliesTo(1, "/Satoshi:0.1.0/"));
                 -    BOOST_CHECK(alerts[2].AppliesTo(1, "/Satoshi:0.2.0/"));
                 -
                 -    // Don't match:
                 -    BOOST_CHECK(!alerts[0].AppliesTo(-1, ""));
                 -    BOOST_CHECK(!alerts[0].AppliesTo(999002, ""));
                 -
                 -    BOOST_CHECK(!alerts[1].AppliesTo(1, ""));
                 -    BOOST_CHECK(!alerts[1].AppliesTo(1, "Satoshi:0.1.0"));
                 -    BOOST_CHECK(!alerts[1].AppliesTo(1, "/Satoshi:0.1.0"));
                 -    BOOST_CHECK(!alerts[1].AppliesTo(1, "Satoshi:0.1.0/"));
                 -    BOOST_CHECK(!alerts[1].AppliesTo(-1, "/Satoshi:0.1.0/"));
                 -    BOOST_CHECK(!alerts[1].AppliesTo(999002, "/Satoshi:0.1.0/"));
                 -    BOOST_CHECK(!alerts[1].AppliesTo(1, "/Satoshi:0.2.0/"));
                 -
                 -    BOOST_CHECK(!alerts[2].AppliesTo(1, "/Satoshi:0.3.0/"));
                 -
                 -    SetMockTime(0);
                 -}
                 -
                 -
                 -// This uses sh 'echo' to test the   -alertnotify function, writing to a
                 -// /tmp file. So skip it on Windows:
                 -#ifndef WIN32
                 -BOOST_AUTO_TEST_CASE(AlertNotify)
                 -{
                 -    SetMockTime(11);
                 -
                 -    boost::filesystem::path temp = GetTempPath() / "alertnotify.txt";
                 -    boost::filesystem::remove(temp);
                 -
                 -    mapArgs["     -alertnotify"] = std::string("echo %s >> ") + temp.string();
                 -
                 -    BOOST_FOREACH(CAlert alert, alerts)
                 -        alert.ProcessAlert(false);
                 -
                 -    std::vector<std::string> r = read_lines(temp);
                 -    BOOST_CHECK_EQUAL(r.size(), 4u);
                 -    BOOST_CHECK_EQUAL(r[0], "Alert 1");
                 -    BOOST_CHECK_EQUAL(r[1], "Alert 2, cancels 1");
                 -    BOOST_CHECK_EQUAL(r[2], "Alert 2, cancels 1");
                 -    BOOST_CHECK_EQUAL(r[3], "Evil Alert; /bin/ls; echo "); // single -quotes should be removed
                 -
                 -    boost::filesystem::remove(temp);
                 -
                 -    SetMockTime(0);
                 -}
                 -#endif
                 -
                 -BOOST_AUTO_TEST_SUITE_END()
                

                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.*

                  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/base58_tests.cpp

                   +#include "stealth.h"
                  

                  Code added

                   -                    EncodeBase58(&sourcedata[0], &sourcedata[sourcedata.size()]) == base58string,
                   +                            EncodeBase58(&sourcedata[0], &sourcedata[sourcedata.size()]) == base58string,
                  
                   -              strTest);
                   +                         strTest);
                  

                  Code replaces, space added, review ?

                   +    bool operator()(const CStealthAddress &id) const
                   +    {
                   +        return (exp_addrType == "stealthaddress");
                   +    }
                  

                  Code added

                   -            CKey privkey = secret.GetKey();
                  
                   +            CKey privkey;
                   +            bool fCompressed;
                   +            CSecret secret1  = secret.GetSecret(fCompressed);
                   +            privkey.SetSecret(secret1, fCompressed);
                  

                  Code replaced

                   -  BOOST_CHECK_MESSAGE(privkey.size() == exp_payload.size() && std::equal(privkey.begin(), privkey.end(), exp_payload.begin()), "key mismatch:" + strTest);
                  
                   + BOOST_CHECK_MESSAGE(secret1.size() == exp_payload.size() && std::equal(secret1.begin(), secret1.end(), exp_payload.begin()), "key mismatch:" + strTest);
                  

                  Code replaced

                   -            key.Set(exp_payload.begin(), exp_payload.end(), isCompressed);
                  
                   +            CSecret secret2;
                   +            key.SetSecret(secret2);
                  

                  Code replaced

                    -            secret.SetKey(key);
                  
                   +            secret.SetSecret(secret2, isCompressed);
                  

                  Code replaced

                   -            BOOST_CHECK_MESSAGE(boost::apply_visitor(CBitcoinAddressVisitor(&addrOut), dest), "encode dest: " + strTest);
                  
                   +            BOOST_CHECK_MESSAGE(addrOut.Set(dest), "encode dest: " + strTest);
                  

                  Code replaced

                   -    BOOST_CHECK(!boost::apply_visitor(CBitcoinAddressVisitor(&dummyAddr), nodest));
                  
                   +    BOOST_CHECK(!dummyAddr.Set(nodest));
                  

                  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/base58_tests.cpp

                    File deleted

                    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/data/base58_keys_valid.json

                      Examples of Bitcoin numerous blocks specific code replaced

                       -        "1AGNa15ZQXAZUgFiqJ2i7Z2DPU2J6hW62i", 
                       +        "6j67A8CE6DMgKMY4q3fgjC4UQoNzrNUdX6", 
                      
                       -        "65a16059864a2fdbc7c99a4723a8395bc6f188eb", 
                       +        "3AC0FAD9E573F057D1458C0EB41481C2B8ABB858",
                      

                      Code replaced

                       -        "mo9ncXisMeAoXwqcV5EWuyncbmCcQN4rVs", 
                       +        "5nRT79vGJeFtc6z3D3nKJZE1rhqDSZqkY75P3LJedyz9wRDoWau", 
                      
                       -        "53c0307d6851aa0ce7825ba883c6bd9ad242b486", 
                       +        "B755D9FC1B2926A687C1D63DC7BB553EBD03C3E7B607CFD4CE58840C913DC035", 
                      

                      Code replaced

                       -        {
                       -            "addrType": "pubkey", 
                       -            "isPrivkey": false, 
                       -            "isTestnet": true
                       -        }
                       -    ], 
                       -    [
                       -        "2N2JD6wb56AfK4tfmM6PwdVmoYk2dCKf4Br", 
                       -        "6349a418fc4578d10a372b54b45c280cc8c4382f", 
                       -        {
                       -            "addrType": "script", 
                       -            "isPrivkey": false, 
                       -            "isTestnet": true
                       -        }
                       -    ], 
                       -    [
                       -        "5Kd3NBUAdUnhyzenEwVLy9pBKxSwXvE9FMPyR4UKZvpe6E3AgLr", 
                       -        "eddbdc1168f1daeadbd3e44c1e3f8f5a284c2029f78ad26af98583a499de5b19", 
                      

                      Code removed

                       -    "Kz6UJmQACJmLtaQj5A3JAge4kVTNQ8gbvXuwbmCj7bsaabudb3RD", 
                       +   "N7UvEAN6YsSimwQkkBH1nVESnPDouqxBAHpLHJCu8EXGSszwtjNw", 
                      
                       -   "55c9bccb9ed68446d1b75273bbce89d7fe013a8acd1625514420fb2aca1a21c4", 
                       +     "B755D9FC1B2926A687C1D63DC7BB553EBD03C3E7B607CFD4CE58840C913DC035", 
                      

                      Code replaced

                       -   "9213qJab2HNEpMpYNBa7wHGFKKbkDn24jpANDs2huN3yi4J11ko", 
                       +   "6m6t5VGTn1ZjgVBmU2JXApUGC1imcs1NDH", 
                      
                       -   "36cb93b9ab1bdabf7fb9f2c04f1b9cc879933530ae7842398eef5a63a56800c2", 
                       +  "50D6BA94A1AB75E01E26A8C9BFEED68169136281", 
                      

                      Code replaced

                       -        {
                       -            "isCompressed": false, 
                       -            "isPrivkey": true, 
                       -            "isTestnet": true
                       -        }
                       -    ], 
                       -    [
                       -        "cTpB4YiyKiBcPxnefsDpbnDxFDffjqJob8wGCEDXxgQ7zQoMXJdH", 
                       -        "b9f4892c9e8282028fea1d2667c4dc5213564d41fc5783896a0d843fc15089f3", 
                       -        {
                       -            "isCompressed": true, 
                       -            "isPrivkey": true, 
                       -            "isTestnet": true
                       -        }
                       -    ], 
                       -    [
                       -        "1Ax4gZtb7gAit2TivwejZHYtNNLT18PUXJ", 
                       -        "6d23156cbbdcc82a5a47eee4c2c7c583c18b6bf4", 
                      

                      Code removed

                        -        "n3ZddxzLvAY9o7184TB4c6FJasAybsw4HZ", 
                       +        "5njpn1dGnyhduB3Hog2tCoYcAS3XUg9F1saQAcKJbbpy2FszZcR", 
                      
                       -        "f1d470f9b02370fdec2e6b708b08ac431bf7a5f7", 
                       +        "E10E0E8270779EE90D3577C1AD767645933DAE88AD7049FFF17D259865BD327E", 
                      

                      Code replaced

                       -        {
                       -            "addrType": "pubkey", 
                       -            "isPrivkey": false, 
                       -            "isTestnet": true
                       -        }
                       -    ], 
                       -    [
                       -        "2NBFNJTktNa7GZusGbDbGKRZTxdK9VVez3n", 
                       -        "c579342c2c4c9220205e2cdc285617040c924a0a", 
                       -        {
                       -            "addrType": "script", 
                       -            "isPrivkey": false, 
                       -            "isTestnet": true
                       -        }
                       -    ], 
                       -    [
                       -        "5K494XZwps2bGyeL71pWid4noiSNA2cfCibrvRWqcHSptoFn7rc", 
                       -        "a326b95ebae30164217d7a7f57d72ab2b54e3be64928a19da0210b9568d4015e", 
                      

                      Code removed

                        -        "L1RrrnXkcKut5DEMwtDthjwRcTTwED36thyL1DebVrKuwvohjMNi", 
                       +        "N8t1sfm6hwGMsHK7B1HK16SWCdY9X9mNrrERFQsnfiiiGSLH6S1r", 
                      
                        -    "7d998b45c219a1e38e99e7cbd312ef67f77a455a9b50c730c27f02c6f730dfb4", 
                       +     "E10E0E8270779EE90D3577C1AD767645933DAE88AD7049FFF17D259865BD327E", 
                      

                      Code removed

                       -        {
                       -            "isCompressed": false, 
                       -            "isPrivkey": true, 
                       -            "isTestnet": true
                       -        }
                       -    ], 
                       -    [
                       -        "cTDVKtMGVYWTHCb1AFjmVbEbWjvKpKqKgMaR3QJxToMSQAhmCeTN", 
                       -        "a81ca4e8f90181ec4b61b6a7eb998af17b2cb04de8a03b504b9e34c4c61db7d9", 
                       -        {
                       -            "isCompressed": true, 
                       -            "isPrivkey": true, 
                       -            "isTestnet": true
                       -        }
                       -    ], 
                       -    [
                       -        "1C5bSj1iEGUgSTbziymG7Cn18ENQuT36vv", 
                       -        "7987ccaa53d02c8873487ef919677cd3db7a6912", 
                      

                      Code removed

                       -        "n3LnJXCqbPjghuVs8ph9CYsAe4Sh4j97wk", 
                       +        "5mLfetgJoMYZg67GC9GGoaeXVS5aCeTLCQ3iFygyK1XPiENmBVF", 
                      
                       -        "ef66444b5b17f14e8fae6e7e19b045a78c54fd79", 
                       +        "28C700D23D12201911D7C4D2C4A6F1AB574AFA3B8C2A5FEDA30FC2B0AB72B30A", 
                      

                      Code replaced

                       -        {
                       -            "addrType": "pubkey", 
                       -            "isPrivkey": false, 
                       -            "isTestnet": true
                       -        }
                       -    ], 
                       -    [
                       -        "2NB72XtkjpnATMggui83aEtPawyyKvnbX2o", 
                       -        "c3e55fceceaa4391ed2a9677f4a4d34eacd021a0", 
                       -        {
                       -            "addrType": "script", 
                       -            "isPrivkey": false, 
                       -            "isTestnet": true
                       -        }
                       -    ], 
                       -    [
                       -        "5KaBW9vNtWNhc3ZEDyNCiXLPdVPHCikRxSBWwV9NrpLLa4LsXi9", 
                       -        "e75d936d56377f432f404aabb406601f892fd49da90eb6ac558a733c93b47252", 
                      

                      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.*

                        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/data/script_invalid.json

                        Various code replaced from Bitcoin variables

                         +["2147483648", "NEGATE 1", "We cannot do math on 5-byte integers"],
                        
                           ["-2147483648", "1ADD 1", "Because we use a sign bit, -2147483648 is also 5 bytes"],
                        
                         +["2147483647", "1ADD 1SUB 1", "We cannot do math on 5-byte integers, even if the result is 4-bytes"],
                         +["2147483648", "1SUB 1", "We cannot do math on 5-byte integers, even if the result is 4-bytes"],
                        

                        Code added

                         - -["0x4c 0 0x01 1", "HASH160 0x14 0xda1745e9b549bd0bfa1a569971c77eba30cd5a4b EQUAL"]
                         -[
                         -"0x4c 0 0x01 1", "HASH160 0x14 0xda1745e9b549bd0bfa1a569971c77eba30cd5a4b EQUAL"],
                         -
                         -["0x40 0x42424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242",
                         -"0x4d 0x4000 0x42424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242 EQUAL",
                         -"Basic PUSH signedness check"],
                         -
                         -["0x4c 0x40 0x42424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242",
                         -"0x4d 0x4000 0x42424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242 EQUAL",
                         -"Basic PUSHDATA1 signedness check"],
                        

                        Code removed

                         +    "DERSIG",
                         +    "P2PK NOT with too much R padding"
                        

                        Code added

                         -    "",
                         +    "DERSIG",
                         -    "BIP66 example 6, without DERSIG"
                         +    "BIP66 example 6, with DERSIG"
                        

                        Code replaced

                         -    "",
                         -    "BIP66 example 10, without DERSIG"
                         -],
                         -[
                         -    "0 0x47 0x30440220f00a77260d34ec2f0c59621dc710f58169d0ca06df1a88cd4b1f1b97bd46991b02201ee220c7e04f26aed03f94aa97fb09ca5627163bf4ba07e6979972ec737db22601 0",
                         -    "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 2 CHECKMULTISIG NOT",
                         -    "",
                         -    "BIP66 example 12, without DERSIG"
                         -],
                         -[
                         -    "0 0x47 0x30440220f00a77260d34ec2f0c59621dc710f58169d0ca06df1a88cd4b1f1b97bd46991b02201ee220c7e04f26aed03f94aa97fb09ca5627163bf4ba07e6979972ec737db22601 0",
                         -    "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 2 CHECKMULTISIG NOT",
                        

                        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.*

                          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/data/script_valid.json

                           +["549755813887", "SIZE 5 EQUAL"],
                           +["549755813888", "SIZE 6 EQUAL"],
                           +["9223372036854775807", "SIZE 8 EQUAL"],
                          

                          Code added

                           +["-549755813887", "SIZE 5 EQUAL"],
                           +["-549755813888", "SIZE 6 EQUAL"],
                           +["-9223372036854775807", "SIZE 8 EQUAL"],
                          

                          Code added

                           +["549755813887", "0x05 0xFFFFFFFF7F EQUAL"],
                           +["549755813888", "0x06 0xFFFFFFFF7F EQUAL"],
                           +["9223372036854775807", "0x08 0xFFFFFFFFFFFFFF7F EQUAL"],
                          

                          Code added

                           +["-4294967295", "0x05 0xFFFFFFFF80 EQUAL"],
                           +["-549755813887", "0x05 0xFFFFFFFFFF EQUAL"],
                           +["-549755813888", "0x06 0x000000008080 EQUAL"],
                           +["-9223372036854775807", "0x08 0xFFFFFFFFFFFFFFFF EQUAL"],
                          

                          Code added

                           +["0x4a 0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0 CHECKSIG NOT", "", "Overly long signature is correctly encoded"],
                           +["0x25 0x30220220000000000000000000000000000000000000000000000000000000000000000000", "0 CHECKSIG NOT", "", "Missing S is correctly encoded"],
                           +["0x27 0x3024021077777777777777777777777777777777020a7777777777777777777777777777777701", "0 CHECKSIG NOT", "", "S with invalid S length is correctly encoded"],
                           +["0x27 0x302403107777777777777777777777777777777702107777777777777777777777777777777701", "0 CHECKSIG NOT", "", "Non-integer R is correctly encoded"],
                           +["0x27 0x302402107777777777777777777777777777777703107777777777777777777777777777777701", "0 CHECKSIG NOT", "", "Non-integer S is correctly encoded"],
                           +["0x17 0x3014020002107777777777777777777777777777777701", "0 CHECKSIG NOT", "", "Zero-length R is correctly encoded"],
                           +["0x17 0x3014021077777777777777777777777777777777020001", "0 CHECKSIG NOT", "", "Zero-length S is correctly encoded"],
                           +["0x27 0x302402107777777777777777777777777777777702108777777777777777777777777777777701", "0 CHECKSIG NOT", "", "Negative S is correctly encoded"],
                           +
                           +[
                           +    "0x47 0x30440220003040725f724b0e2142fc44ac71f6e13161f6410aeb6dee477952ede3b6a6ca022041ff4940ee3d88116ad281d7cc556e1f2c9427d82290bd7974a25addbcd5bede01",
                           +    "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG NOT",
                           +    "",
                           +    "P2PK NOT with bad sig with too much R padding but no DERSIG"
                           +],
                           +[
                           +    "0",
                           +    "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG NOT",
                           +    "",
                           +    "BIP66 example 4, without DERSIG"
                           +],
                           +[
                           +    "0",
                           +    "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG NOT",
                           +    "DERSIG",
                           +    "BIP66 example 4, with DERSIG"
                           +],
                           +[
                           +    "1",
                           +    "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG NOT",
                           +    "",
                           +    "BIP66 example 6, without DERSIG"
                           +],
                           +[
                           +    "0 0 0x47 0x30440220afa76a8f60622f813b05711f051c6c3407e32d1b1b70b0576c1f01b54e4c05c702200d58e9df044fd1845cabfbeef6e624ba0401daf7d7e084736f9ff601c3783bf501",
                           +    "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 2 CHECKMULTISIG NOT",
                           +    "",
                           +    "BIP66 example 10, without DERSIG"
                           +],
                           +[
                           +    "0 0x47 0x30440220f00a77260d34ec2f0c59621dc710f58169d0ca06df1a88cd4b1f1b97bd46991b02201ee220c7e04f26aed03f94aa97fb09ca5627163bf4ba07e6979972ec737db22601 0",
                           +    "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 2 CHECKMULTISIG NOT",
                           +    "",
                           +    "BIP66 example 12, without DERSIG"
                           +],
                           +[
                           +    "0 0x47 0x30440220f00a77260d34ec2f0c59621dc710f58169d0ca06df1a88cd4b1f1b97bd46991b02201ee220c7e04f26aed03f94aa97fb09ca5627163bf4ba07e6979972ec737db22601 0",
                           +    "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 2 CHECKMULTISIG NOT",
                           +    "DERSIG",
                           +    "BIP66 example 12, with DERSIG"
                           +],
                           +
                          

                          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/data/tx_valid.json

                             -["The following is 23b397edccd3740a74adb603c9756370fafcde9bcc4483eb271ecad09a94dd63"],
                             -["It is of particular interest because it contains an invalidly  -encoded signature which OpenSSL accepts"],
                             -["See http://r6.ca/blog/20111119T211504Z.html"],
                             -["It is also the first OP_CHECKMULTISIG transaction in standard form"],
                             -[[["60a20bd93aa49ab4b28d514ec10b06e1829ce6818ec06cd3aabd013ebcdc4bb1", 0, "1 0x41 0x04cc71eb30d653c0c3163990c47b976f3fb3f37cccdcbedb169a1dfef58bbfbfaff7d8a473e7e2e6d317b87bafe8bde97e3cf8f065dec022b51d11fcdd0d348ac4 0x41 0x0461cbdcc5409fb4b4d42b51d33381354d80e550078cb532a34bfa2fcfdeb7d76519aecc62770f5b0e4ef8551946d8a540911abe3e7854a26f39f58b25c15342af 2 OP_CHECKMULTISIG"]],
                             -"0100000001b14bdcbc3e01bdaad36cc08e81e69c82e1060bc14e518db2b49aa43ad90ba26000000000490047304402203f16c6f40162ab686621ef3000b04e75418a0c0cb2d8aebeac894ae360ac1e780220ddc15ecdfc3507ac48e1681a33eb60996631bf6bf5bc0a0682c4db743ce7ca2b01ffffffff0140420f00000000001976a914660d4ef3a743e3e696ad990364e555c271ad504b88ac00000000", true],
                             -
                             -["The following is a tweaked form of 23b397edccd3740a74adb603c9756370fafcde9bcc4483eb271ecad09a94dd63"],
                             -["It has an arbitrary extra byte stuffed into the signature at pos length - 2"],
                             -[[["60a20bd93aa49ab4b28d514ec10b06e1829ce6818ec06cd3aabd013ebcdc4bb1", 0, "1 0x41 0x04cc71eb30d653c0c3163990c47b976f3fb3f37cccdcbedb169a1dfef58bbfbfaff7d8a473e7e2e6d317b87bafe8bde97e3cf8f065dec022b51d11fcdd0d348ac4 0x41 0x0461cbdcc5409fb4b4d42b51d33381354d80e550078cb532a34bfa2fcfdeb7d76519aecc62770f5b0e4ef8551946d8a540911abe3e7854a26f39f58b25c15342af 2 OP_CHECKMULTISIG"]],
                             -"0100000001b14bdcbc3e01bdaad36cc08e81e69c82e1060bc14e518db2b49aa43ad90ba260000000004A0048304402203f16c6f40162ab686621ef3000b04e75418a0c0cb2d8aebeac894ae360ac1e780220ddc15ecdfc3507ac48e1681a33eb60996631bf6bf5bc0a0682c4db743ce7ca2bab01ffffffff0140420f00000000001976a914660d4ef3a743e3e696ad990364e555c271ad504b88ac00000000", true],
                             -
                            

                            Example of Bitcoin specific Code removed

                             -["Tests for CheckTransaction()"],
                            
                            +["Tests for CTransaction::CheckTransaction()"],
                            

                            Code replaced

                             + "01000000020001000000000000000000000000000000000000000000000000000000000000000000004948304502203a0f5f0e1f2bdbcd04db3061d18f3af70e07f4f467cbc1b8116f267025f5360b022100c792b6e215afc5afc721a351ec413e714305cb749aae3d7fee76621313418df101010000000002000000000000000000000000000000000000000000000000000000000000000000004847304402205f7530653eea9b38699e476320ab135b74771e1c48b81a5d041e2ca84b9be7a802200ac8d1f40fb026674fe5a5edd3dea715c27baa9baca51ed45ea750ac9dc0a55e81ffffffff010100000000000000015100000000", true]
                            

                            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/key_tests.cpp

                               -static const string strSecret1     ("5HxWvvfubhXpYYpS3tJkw6fq9jE9j18THftkZjHHfmFiWtmAbrj");
                               +static const string strSecret1     ("5mDrMmqC7Rg32vN5REY55krG8L5sYtvjouhQFT2fJSWf6YNoAQF");
                              
                               -static const string strSecret2     ("5KC4ejrDjv152FGwP386VD1i2NYc5KkfSMyv1nGy1VGDxGHqVY3");
                               +static const string strSecret2     ("5nEw8kna8rJtg3geRwVBZc1eErJDzdHSabLT1F4yrVUdmYhPHC1");
                              
                               -static const string strSecret1C    ("Kwr371tjA9u2rFSMZjTNun2PXXP3WPZu2afRHTcta6KxEUdm1vEw");
                               +static const string strSecret1C    ("N2Birgsi3MuHyUY2Vxk91zYRmMEW7nCBx3bKcmtL3ybu95ZRtUa5");
                              
                               -static const string strSecret2C    ("L3Hq7a8FEQwJkW1M2GNKDW28546Vp5miewcCzSqUD9kCAXrJdS3g");
                               +static const string strSecret2C    ("N6gVwEG9Fedy5LqzD5VPcuXqN8b2MM9ZuGYqn56ZwSgyHPTHUrLB");
                              
                               -static const CBitcoinAddress addr1 ("1QFqqMUD55ZV3PJEJZtaKCsQmjLT6JkjvJ");
                               +static const CBitcoinAddress addr1 ("6mBjfXRA89XeSjTc1rzDQ1cWmggBvJ59NB");
                              
                               -static const CBitcoinAddress addr2 ("1F5y5E5FMc5YzdJtB9hLaUe43GDxEKXENJ");
                               +static const CBitcoinAddress addr2 ("6jZqmkFVLY9LBgawnLqXUN5uj1NEHT3vc3");
                              
                               -static const CBitcoinAddress addr1C("1NoJrossxPBKfCHuJXT4HadJrXRE9Fxiqs");
                               +static const CBitcoinAddress addr1C("71N4eaVLuWaqkQmBh64Pj9FtrHTRyauYwy");
                              
                              -static const CBitcoinAddress addr2C("1CRj2HyM1CXWzHAXLQtiGLyggNT9WQqsDs");
                               +static const CBitcoinAddress addr2C("6jBJB4kS8tWVCV85e5EfeV8UEB6rAEXRfX");
                              
                               -static const string strAddressBad("1HV9Lc3sNHZxwj4Zk6fB38tEmBryq2cBiF");
                               +static const string strAddressBad("6j67A8CE6DMgKMY4q3fgjC4UQoNzrNUdXX");
                              

                              Code replaced

                               -    CKey key1  = bsecret1.GetKey();
                              
                               +    bool fCompressed;
                               +    
                               +    CSecret secret1 = bsecret1.GetSecret(fCompressed);
                               +    CKey key1;
                               +    key1.SetSecret(secret1);
                               BOOST_CHECK(key1.IsCompressed() == false);
                              
                               -    CKey key2  = bsecret2.GetKey();
                              
                               +    
                               +    CSecret secret2 = bsecret2.GetSecret(fCompressed);
                               +    CKey key2;
                               +    key2.SetSecret(secret2);
                              
                                   BOOST_CHECK(key2.IsCompressed() == false);
                              
                               -    CKey key1C = bsecret1C.GetKey();
                               +    
                              
                               -    BOOST_CHECK(key1C.IsCompressed() == true);
                               +    
                              
                               -    CKey key2C = bsecret2C.GetKey();
                              
                               +    CSecret secret1C = bsecret1C.GetSecret(fCompressed);
                               +    CKey key1C;
                               +    key1C.SetSecret(secret1C);
                               BOOST_CHECK(key1C.IsCompressed() == true);
                               BOOST_CHECK(key1C.IsCompressed() == true);
                               +    
                               +    CSecret secret2C = bsecret2C.GetSecret(fCompressed);
                               +    CKey key2C;
                               +    key2C.SetSecret(secret2C);
                               +    BOOST_CHECK(key2C.IsCompressed() == true);
                              

                              Code replaced

                               -        BOOST_CHECK( pubkey1.Verify(hashMsg, sign1));
                               +        BOOST_CHECK( key1.Verify(hashMsg, sign1));
                              
                               -        BOOST_CHECK(!pubkey1.Verify(hashMsg, sign2));
                               +        BOOST_CHECK(!key1.Verify(hashMsg, sign2));
                              
                               -        BOOST_CHECK( pubkey1.Verify(hashMsg, sign1C));
                               +        BOOST_CHECK( key1.Verify(hashMsg, sign1C));
                              
                               -        BOOST_CHECK(!pubkey1.Verify(hashMsg, sign2C));
                               +        BOOST_CHECK(!key1.Verify(hashMsg, sign2C));
                              
                               -        BOOST_CHECK(!pubkey2.Verify(hashMsg, sign1));
                               +        BOOST_CHECK(!key2.Verify(hashMsg, sign1));
                              
                               -        BOOST_CHECK( pubkey2.Verify(hashMsg, sign2));
                               +        BOOST_CHECK( key2.Verify(hashMsg, sign2));
                              
                               -        BOOST_CHECK(!pubkey2.Verify(hashMsg, sign1C));
                               +        BOOST_CHECK(!key2.Verify(hashMsg, sign1C));
                              
                               -        BOOST_CHECK( pubkey2.Verify(hashMsg, sign2C));
                               +        BOOST_CHECK( key2.Verify(hashMsg, sign2C));
                              
                               -        BOOST_CHECK( pubkey1C.Verify(hashMsg, sign1));
                               +        BOOST_CHECK( key1C.Verify(hashMsg, sign1));
                              
                               -        BOOST_CHECK(!pubkey1C.Verify(hashMsg, sign2));
                               +        BOOST_CHECK(!key1C.Verify(hashMsg, sign2));
                              
                               -        BOOST_CHECK( pubkey1C.Verify(hashMsg, sign1C));
                               +        BOOST_CHECK( key1C.Verify(hashMsg, sign1C));
                              
                               -        BOOST_CHECK(!pubkey1C.Verify(hashMsg, sign2C));
                               +        BOOST_CHECK(!key1C.Verify(hashMsg, sign2C));
                              
                               -        BOOST_CHECK(!pubkey2C.Verify(hashMsg, sign1));
                               +        BOOST_CHECK(!key2C.Verify(hashMsg, sign1));
                              
                               -        BOOST_CHECK( pubkey2C.Verify(hashMsg, sign2));
                               +        BOOST_CHECK( key2C.Verify(hashMsg, sign2));
                              
                               -        BOOST_CHECK(!pubkey2C.Verify(hashMsg, sign1C));
                               +        BOOST_CHECK(!key2C.Verify(hashMsg, sign1C));
                              
                               -        BOOST_CHECK( pubkey2C.Verify(hashMsg, sign2C));
                               +        BOOST_CHECK( key2C.Verify(hashMsg, sign2C));
                              

                              Code replaced

                               -        CPubKey rkey1, rkey2, rkey1C, rkey2C;
                               +        CKey rkey1, rkey2, rkey1C, rkey2C;
                              
                              
                               -        BOOST_CHECK(rkey1.RecoverCompact (hashMsg, csign1));
                               +        BOOST_CHECK(rkey1.SetCompactSignature (hashMsg, csign1));
                              
                               -        BOOST_CHECK(rkey2.RecoverCompact (hashMsg, csign2));
                               +        BOOST_CHECK(rkey2.SetCompactSignature (hashMsg, csign2));
                              
                               -        BOOST_CHECK(rkey1C.RecoverCompact(hashMsg, csign1C));
                               +        BOOST_CHECK(rkey1C.SetCompactSignature(hashMsg, csign1C));
                              
                               -        BOOST_CHECK(rkey2C.RecoverCompact(hashMsg, csign2C));
                               +        BOOST_CHECK(rkey2C.SetCompactSignature(hashMsg, csign2C));
                              
                               -        BOOST_CHECK(rkey1  == pubkey1);
                               +        BOOST_CHECK(rkey1.IsCompressed() == pubkey1.IsCompressed());
                              
                               -        BOOST_CHECK(rkey2  == pubkey2);
                               +        BOOST_CHECK(rkey2.IsCompressed()  == pubkey2.IsCompressed());
                              
                               -        BOOST_CHECK(rkey1C == pubkey1C);
                               +        BOOST_CHECK(rkey1C.IsCompressed() == pubkey1C.IsCompressed());
                              
                               -        BOOST_CHECK(rkey2C == pubkey2C);
                               +        BOOST_CHECK(rkey2C.IsCompressed() == pubkey2C.IsCompressed());
                              

                              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/main_tests.cpp

                                 -        BOOST_CHECK(nSubsidy <= 50 * COIN);
                                
                                 +        BOOST_CHECK(nSubsidy <= 200 * COIN);
                                

                                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/miner_tests.cpp

                                  File removed

                                   -// Copyright (c) 2011     -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 "main.h"
                                   -#include "miner.h"
                                   -#include "uint256.h"
                                   -#include "util.h"
                                   -
                                   -#include <boost/test/unit_test.hpp>
                                   -
                                   -extern void SHA256Transform(void* pstate, void* pinput, const void* pinit);
                                   -
                                   -BOOST_AUTO_TEST_SUITE(miner_tests)
                                  

                                  Example 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.*

                                    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/multisig_tests.cpp

                                     -    BOOST_FOREACH(const CKey &key, keys)
                                    
                                     +    BOOST_FOREACH(CKey &key, keys)
                                    

                                    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/rpc_tests.cpp

                                        -BOOST_AUTO_TEST_CASE(rpc_rawsign)
                                      
                                       +/*BOOST_AUTO_TEST_CASE(rpc_rawsign)
                                      
                                       +}*/
                                      

                                      code commented out

                                      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/rpc_tests.cpp

                                        - LOCK(pwalletMain->cs_wallet);
                                        
                                        + LOCK2(cs_main, pwalletMain->cs_wallet);
                                        

                                        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/script_P2SH_tests.cpp

                                          +    LOCK(cs_main);
                                          

                                          Code added

                                           +    LOCK(cs_main);
                                          

                                          Code added
                                          - keys.push_back(key[i].GetPubKey());
                                          + keys.push_back(key[i]);
                                          }

                                           CScript inner[4];
                                           inner[0].SetDestination(key[0].GetPubKey().GetID());
                                          
                                           -    inner[1].SetMultisig(2, std::vector<CPubKey>(keys.begin(), keys.begin()+2));
                                           +    inner[1].SetMultisig(2, std::vector<CKey>(keys.begin(), keys.begin()+2));
                                          
                                           -    inner[2].SetMultisig(1, std::vector<CPubKey>(keys.begin(), keys.begin()+2));
                                           +    inner[2].SetMultisig(1, std::vector<CKey>(keys.begin(), keys.begin()+2));
                                          
                                           -    inner[3].SetMultisig(2, std::vector<CPubKey>(keys.begin(), keys.begin()+3));
                                           +    inner[3].SetMultisig(2, std::vector<CKey>(keys.begin(), keys.begin()+3));
                                          

                                          Code replaced

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

                                          Code replaced

                                           -        keys.push_back(key[i].GetPubKey());
                                          
                                           +        keys.push_back(key[i]);
                                          

                                          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/script_tests.cpp

                                             +        int flagsNow = flags;
                                             +        if (test.size() > 3 && ("," + test[2].get_str() + ",").find(",DERSIG,") != string::npos) {
                                             +            flagsNow |= SCRIPT_VERIFY_DERSIG;
                                             +        }
                                             +
                                            

                                            Code added

                                             -        BOOST_CHECK_MESSAGE(VerifyScript(scriptSig, scriptPubKey, tx, 0, flags, SIGHASH_NONE), strTest);
                                            
                                             +        BOOST_CHECK_MESSAGE(VerifyScript(scriptSig, scriptPubKey, tx, 0, flagsNow, SIGHASH_NONE), strTest);
                                            

                                            Code replaced

                                             +        int flagsNow = flags;
                                             +        if (test.size() > 3 && (","      + test[2].get_str()      + ",").find(",DERSIG,") != string::npos) {
                                             +            flagsNow |= SCRIPT_VERIFY_DERSIG;
                                             +        }
                                             +
                                                 CTransaction tx;
                                            
                                             -        BOOST_CHECK_MESSAGE(!VerifyScript(scriptSig, scriptPubKey, tx, 0, flags, SIGHASH_NONE), strTest);
                                             +        BOOST_CHECK_MESSAGE(!VerifyScript(scriptSig, scriptPubKey, tx, 0, flagsNow, SIGHASH_NONE), strTest);
                                            
                                            
                                            
                                             @@      -209,7      +219,7 @@ sign_multisig(CScript scriptPubKey, std::vector<CKey> keys, CTransaction transac
                                             // and vice     -versa)
                                             //
                                            
                                             result << OP_0;
                                             -    BOOST_FOREACH(const CKey &key, keys)
                                             +    BOOST_FOREACH(CKey &key, keys)
                                            
                                             {
                                            
                                                 vector<unsigned char> vchSig;
                                                 BOOST_CHECK(key.Sign(hash, vchSig));
                                              @@      -390,7      +400,7 @@ BOOST_AUTO_TEST_CASE(script_combineSigs)
                                             BOOST_CHECK(combined == scriptSig);
                                            
                                            
                                              // Hardest case:  Multisig 2 -of -3
                                             -    scriptPubKey.SetMultisig(2, pubkeys);
                                             +    scriptPubKey.SetMultisig(2, keys);
                                            

                                            Code replaced

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