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

    [Dev] Documenting Feathercoin Specific Software settings - Part 8

    Technical Development
    1
    53
    10088
    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.*

      Blockchain comment : - commit

      https://github.com/FeatherCoin/Feathercoin/commit/07b97230a33008f23992330eb1689382df53a1e8

      Adds support for making comments in Blockchain

      src/qt/walletview.h

       +    /** Open comment dialog **/
       +    void inertBlockChain();
       +    
      

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

        fix code : - commit

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

        fix code

        src/main.cpp

         -    //if (!CheckProofOfWork(block.GetHash(), block.nBits))
         -    //if (!CheckProofOfWork(block.GetPoWHash(), block.nBits))
        

        Commented out code removed

          // Feathercoin: eHRC at 3rd hard fork
        
         -//int64_t nTargetTimespan = 60; // Feathercoin: 1 minute 
         -//int64_t nTargetSpacing = 60; // Feathercoin: 1 minute
        

        Commented out code removed

         -static const int64_t nTargetTimespanNEW = 60 ; // Feathercoin: unused
        

        Code removed

         -static const int64_t nDiffChangeTarget = 145000; // Feathercoin: unused ,Patch effective @ block 145000
         -static const int64_t nTestnetResetTargetFix = 157500; // Feathercoin: unused ,Testnet enables target reset at block 157500
        

        Code removed

         -//0.8.7 ACP code have some problem in 0.9.3,so I delete them. 
        

        Comment removed

         -    //if (!pblocktree->WriteDiskBlockIndex(CDiskBlockIndex(pindexNew)) || !pblocktree->WriteBlockIndex(*pindexNew))
        
         -    //if (!pblocktree->WriteBlockIndex(CDiskBlockIndex(pindexNew)))
        

        Commented code removed

         - LogPrintf("CBlockHeader::CheckProofOfWork(), nHeight=%i \n",nHeight);
         + //LogPrintf("CBlockHeader::CheckProofOfWork(), nHeight=%i \n",nHeight);
        

        Code commented out

          -    //if (fCheckPOW && !CheckProofOfWork(block.GetPoWHash(), block.nBits))
          -    //if (fCheckPOW && !CheckProofOfWork(GetPoWHash(), nBits))
        

        Commented out code removed

         -        // auxpow is not in memory, load CDiskBlockHeader
         -        // from database to get it
         -
         -        //Feathercoin unused
         -        //pblocktree->ReadDiskBlockIndex(*phashBlock, diskblockindex);
         -        //block.auxpow = diskblockindex.auxpow;
        

        Commented out code removed

         -    //from dogecoin
         -    /*if (!CheckBlock(*pblock, state, INT_MAX)) {  
         -        if (state.CorruptionPossible())
         -            mapAlreadyAskedFor.erase(CInv(MSG_BLOCK, hash));
         -        return error("ProcessBlock() : CheckBlock FAILED");
         -    }*/
         -    //if (!CheckBlock(*pblock, state,nForkFour-1))
         -    //if (!CheckBlock(*pblock, state,1))
        

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

          fix code : - commit

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

          fix code

          src/qt/Makefile.am

           +  forms/commentdialog.ui \
          

          Add code.

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

            Add debug dialog : - commit

            https://github.com/FeatherCoin/Feathercoin/commit/53644b506ce7b817a4135633184bd3d678b390d5

            debug dialog

            src/crypter.h

            No change, white space 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.*

              Add debug dialog : - commit

              https://github.com/FeatherCoin/Feathercoin/commit/53644b506ce7b817a4135633184bd3d678b390d5

              debug dialog

              src/key.h

               +    // Simply read-only vector-like interface to the pubkey data.
              

              Unnecessary change to a comment?

               -        ::WriteCompactSize(s, len);
              
               +        //::WriteCompactSize(s, len);
               +        ::Serialize(s, VARINT(len), nType, nVersion);
              

              Code replaced

               -        unsigned int len = ::ReadCompactSize(s);
              
               +        //unsigned int len = ::ReadCompactSize(s);
               +        unsigned int len;
               +        ::Unserialize(s, VARINT(len), nType, nVersion);
              

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

                Add debug dialog : - commit

                https://github.com/FeatherCoin/Feathercoin/commit/53644b506ce7b817a4135633184bd3d678b390d5

                debug dialog

                src/main.cpp

                 -            //from bitcoin
                 -            //if (!AddToBlockIndex(block, state, blockPos))
                 -            //    return error("InitBlockIndex AddToBlockIndex() : genesis block not accepted");
                 -            //from dogecoin              
                

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

                  Add debug dialog : - commit

                  https://github.com/FeatherCoin/Feathercoin/commit/53644b506ce7b817a4135633184bd3d678b390d5

                  debug dialog

                  src/qt/Makefile.am

                   +  forms/debugdialog.ui \
                  

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

                    Add debug dialog : - commit

                    https://github.com/FeatherCoin/Feathercoin/commit/53644b506ce7b817a4135633184bd3d678b390d5

                    debug dialog

                    src/qt/bitcoingui.cpp

                     +    debugAction = new QAction(QIcon(":/icons/comment"), tr("&Debug"), this);
                     +    debugAction->setStatusTip(tr("Debug Feathercoin"));
                    
                     +        connect(debugAction, SIGNAL(triggered()), walletFrame, SLOT(debugClicked()));
                    
                     +    help->addAction(debugAction);
                    
                     +    debugAction->setEnabled(enabled);
                    

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

                      Add debug dialog : - commit

                      https://github.com/FeatherCoin/Feathercoin/commit/53644b506ce7b817a4135633184bd3d678b390d5

                      debug dialog

                      src/qt/bitcoingui.h

                       +    QAction *debugAction;
                      

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

                        Add debug dialog : - commit

                        https://github.com/FeatherCoin/Feathercoin/commit/53644b506ce7b817a4135633184bd3d678b390d5

                        debug dialog

                        src/qt/forms/debugdialog.ui

                        New user interface file

                         + <?xml version="1.0" encoding="UTF-8"?>
                         + <ui version="4.0">
                         +  <class>DebugDialog</class>
                         +  <widget class="QDialog" name="DebugDialog">
                         +   <property name="geometry">
                         +    <rect>
                         +     <x>0</x>
                         +     <y>0</y>
                         +     <width>556</width>
                         +     <height>208</height>
                         +    </rect>
                         +   </property>
                         +   <property name="windowTitle">
                         +    <string>Debug Dialog (experts only!)</string>
                         +   </property>
                         +   <widget class="QPushButton" name="sxButton">
                        

                        Start of code new file , 106 lines of code

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

                          Add debug dialog : - commit

                          https://github.com/FeatherCoin/Feathercoin/commit/53644b506ce7b817a4135633184bd3d678b390d5

                          debug dialog

                          src/qt/utilitydialog.cpp

                           + #include "ui_debugdialog.h"
                          
                           + #include "wallet.h"
                          
                           + /** "DebugDialog" dialog box */
                           + DebugDialog::DebugDialog(QWidget *parent) :
                           +     QDialog(parent),
                           +     ui(new Ui::DebugDialog)
                           + {
                           +     ui->setupUi(this);
                           + }
                           + 
                           + void DebugDialog::setModel(WalletModel *model)
                           + {
                           +     this->model = model;
                           + }
                           + 
                           + DebugDialog::~DebugDialog()
                           + {
                           +     delete ui;
                           + }
                           + 
                           + void DebugDialog::on_pushButton_clicked()
                           + {
                           +     close();
                           + }
                           + 
                           + void DebugDialog::on_sxButton_clicked()
                           + {
                           + 		int32_t nFromHeight = 566321;
                           + 		if (ui->addrEdit->text().length()>0)
                           + 		{
                           + 			nFromHeight = ui->addrEdit->text().toInt();
                           + 		}
                           +     bool fUpdate = true;
                           +     CBlockIndex *pindex = chainActive.Genesis();
                           +     
                           +     if (nFromHeight > 0)
                           +     {
                           +         pindex = mapBlockIndex[chainActive.Tip()->GetBlockHash()];
                           +         //pindex = chainActive[nFromHeight];
                           +         while (pindex->nHeight > nFromHeight && pindex->pprev)
                           +             pindex = pindex->pprev;
                           +     };
                           +     
                           +     LogPrintf("Scan open from %d ................\n",pindex->nHeight); 
                           +     CBlock block;
                           +     if (!ReadBlockFromDisk(block, pindex))
                           +     {
                           +     	LogPrintf("ReadBlockFromDisk failure.\n"); 
                           +     	return;
                           +     } 
                           +     LogPrintf("block.vtx.size= %d ................\n",block.vtx.size()); 
                           +     BOOST_FOREACH(CTransaction& tx, block.vtx)
                           +     { 
                           +         string reason;
                           +         if (!IsStandardTx(tx, reason))
                           +         {
                           +         		LogPrintf("Standard transaction %s :reason %s  .\n",tx.GetHash().ToString(),reason);
                           +             continue; // leave out coinbase and others       
                           +         }
                           +         LogPrintf("Find stealth transaction %s :reason %s  .\n",tx.GetHash().ToString(),reason); 
                           +         pwalletMain->AddToWalletIfInvolvingMe(tx.GetHash(), tx, &block, fUpdate);
                           +     };
                           +     
                           +     QMessageBox::information(NULL, tr("Wallet Message"), tr("Scan stealth transactions,Yes!!!"), QMessageBox::Yes , QMessageBox::Yes);
                           + }
                           + 
                           + 
                           + 
                          

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

                            Add debug dialog : - commit

                            https://github.com/FeatherCoin/Feathercoin/commit/53644b506ce7b817a4135633184bd3d678b390d5

                            debug dialog

                            src/qt/utilitydialog.h

                             +     class DebugDialog;
                            
                             + /** "DebugDialog" dialog box */
                             + class DebugDialog : public QDialog
                             + {
                             +     Q_OBJECT
                             + 
                             + public:
                             +     explicit DebugDialog(QWidget *parent);
                             +     ~DebugDialog();
                             + 
                             +     void setModel(WalletModel *model);
                             + 
                             + private:
                             +     Ui::DebugDialog *ui;
                             +     WalletModel *model;
                             + 
                             + private slots:
                             +     void on_sxButton_clicked();
                             +     void on_pushButton_clicked();
                             +     
                             + signals:
                             +     void message(const QString &title, const QString &message, unsigned int style);
                             + };
                             + 
                            

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

                              Add debug dialog : - commit

                              https://github.com/FeatherCoin/Feathercoin/commit/53644b506ce7b817a4135633184bd3d678b390d5

                              debug dialog

                              src/qt/walletframe.cpp

                               + void WalletFrame::debugClicked()
                               + {
                               +     WalletView *walletView = currentWalletView();
                               +     if (walletView)
                               +         walletView->debugClicked();
                               + }
                               + 
                              

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

                                Add debug dialog : - commit

                                https://github.com/FeatherCoin/Feathercoin/commit/53644b506ce7b817a4135633184bd3d678b390d5

                                debug dialog

                                src/qt/walletframe.h

                                 +    /** Open Debug dialog **/
                                 +    void debugClicked();
                                

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

                                  Add debug dialog : - commit

                                  https://github.com/FeatherCoin/Feathercoin/commit/53644b506ce7b817a4135633184bd3d678b390d5

                                  debug dialog

                                  src/qt/walletmodel.cpp

                                   +                    LogPrintf("StealthSecret send start....\n");
                                  

                                  Logprintf added

                                   +     if (true)
                                   +        {
                                   +          LogPrintf("ephem_secret.e[0]=%s \n",ephem_secret.e[0]);   //secret
                                   +          LogPrintf("sxAddr.scan_pubkey= %s\n", HexStr(sxAddr.scan_pubkey).c_str()); //pubkey[0]
                                   +          LogPrintf("sxAddr.spend_pubkey= %s\n", sxAddr.spend_pubkey[0]); //pkSpend[0]
                                   +          LogPrintf("secretShared.e[0]=%s \n",secretShared.e[0]);  //sharedSOut
                                   +          LogPrintf("pkSendTo= %"PRIszu": %s\n", pkSendTo.size(), HexStr(pkSendTo).c_str());//pkOut
                                   +                    
                                  

                                  Code added

                                   +    LogPrintf("CPubKey(pkSendTo)=%s \n",cpkTo.GetHash().ToString().c_str());
                                  

                                  Code added

                                    -   CKeyID ckidTo = cpkTo.GetID();
                                   +      CKeyID ckidTo = cpkTo.GetID();    
                                  

                                  Code replaced, not sure why?

                                   +     LogPrintf("Stealth send to generated pubkey,pkSendTo= %"PRIszu": %s\n", pkSendTo.size(), HexStr(pkSendTo).c_str());
                                  
                                   +   LogPrintf("hash, Address= %s\n", addrTo.ToString().c_str());
                                  
                                   +  LogPrintf("enerate ephem public key,ephem_pubkey= %"PRIszu": %s\n", ephem_pubkey.size(), HexStr(ephem_pubkey).c_str());
                                  

                                  Replace LogPrintf code

                                   -            //scriptPubKey.SetDestination(CBitcoinAddress(rcp.address.toStdString()).Get());
                                  

                                  Remove code

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

                                    Add debug dialog : - commit

                                    https://github.com/FeatherCoin/Feathercoin/commit/53644b506ce7b817a4135633184bd3d678b390d5

                                    debug dialog

                                    src/qt/walletview.cpp

                                     + }
                                     + 
                                     + void WalletView::debugClicked()
                                     + {
                                     +     if(!walletModel)
                                     +         return;
                                     + 
                                     +     DebugDialog dlg(this);
                                     +     dlg.setModel(walletModel);
                                     +     dlg.exec();
                                    

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

                                      Add debug dialog : - commit

                                      https://github.com/FeatherCoin/Feathercoin/commit/53644b506ce7b817a4135633184bd3d678b390d5

                                      debug dialog

                                      src/qt/walletview.h

                                       +    /** Open Debug dialog **/
                                       +    void debugClicked();
                                      

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

                                        Add debug dialog : - commit

                                        https://github.com/FeatherCoin/Feathercoin/commit/53644b506ce7b817a4135633184bd3d678b390d5

                                        debug dialog

                                        src/rpcclient.cpp

                                         +     if (strMethod == "sendtostealthaddress"   && n > 1) ConvertTo<double>(params[1]);
                                         +     if (strMethod == "scanforstealthtxns"     && n > 0) ConvertTo<int>(params[0]);
                                         +     if (strMethod == "scanforalltxns"         && n > 0) ConvertTo<int>(params[0]);
                                        

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

                                          Add debug dialog : - commit

                                          https://github.com/FeatherCoin/Feathercoin/commit/53644b506ce7b817a4135633184bd3d678b390d5

                                          debug dialog

                                          src/rpcwallet.cpp

                                           -        result.push_back(Pair("result", "Invalid Deepcoin stealth address."));
                                           +        result.push_back(Pair("result", "Invalid Feathercoin stealth address."));
                                          

                                          Deepcoin code replaced Feathercoin ?? Translations?

                                           +        pindex = mapBlockIndex[chainActive.Tip()->GetBlockHash()];//[hashBestChain];
                                          

                                          Code replaced

                                           +    printf("Scan open from %d ................\n",nFromHeight); 
                                          

                                          Code added

                                           +        ReadBlockFromDisk(block, pindex);  //block.ReadFromDisk(pindex);
                                           +        printf("pindex->nHeight=%d \n",pindex->nHeight); 
                                          

                                          Code added

                                           +    typedef boost::tuple<uint256, std::vector<unsigned char>, std::vector<unsigned char> > sigdata_type;
                                          
                                           +    Get(uint256 hash, const std::vector<unsigned char>& vchSig, const std::vector<unsigned char>& pubKey)
                                          
                                           +    void Set(uint256 hash, const std::vector<unsigned char>& vchSig, const std::vector<unsigned char>& pubKey)
                                          
                                           +bool CheckSig(vector<unsigned char> vchSig, vector<unsigned char> vchPubKey, CScript scriptCode,
                                          
                                           + /*   CPubKey pubkey(vchPubKey);
                                           +        return false;  */
                                          
                                          
                                           +    if (signatureCache.Get(sighash, vchSig, vchPubKey))
                                          
                                          
                                           +    if (!CPubKey(vchPubKey).Verify(sighash, vchSig))
                                          
                                           +        signatureCache.Set(sighash, vchSig, vchPubKey);
                                          

                                          Code replaced

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

                                            Add debug dialog : - commit

                                            https://github.com/FeatherCoin/Feathercoin/commit/53644b506ce7b817a4135633184bd3d678b390d5

                                            debug dialog, various rv parameter definitions are changed

                                            src/stealth.cpp

                                             -    Q = dG
                                             +    Q = dG  //µ¥´ÎʹÓõÄ˽Կ
                                            

                                            Code replaced

                                             -        rv = 1;
                                             +        rv = 2;
                                            

                                            Code replaced

                                             -        rv = 1;
                                             +        rv = 3;
                                            

                                            Code replaced

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