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

    [Dev] Documenting Feathercoin Specific Software settings - Part 6

    Technical Development
    1
    50
    9999
    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 wrapper

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

      update merchantlist : - commit

      https://github.com/FeatherCoin/Feathercoin/commit/61959aba3255810c33aae1d7f9e72a32f2de3e85

      src/qt/feathercoin.qrc

       +         <file alias="merchant_bittylicious">res/images/bittylicious.png</file>
      
       +         <file alias="merchant_vircurex">res/images/vircurex.png</file>
      

      Additional code jpgs?

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

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

        update merchantlist : - commit

        https://github.com/FeatherCoin/Feathercoin/commit/61959aba3255810c33aae1d7f9e72a32f2de3e85

        src/qt/forms/aboutdialog.ui

         +    <width>555</width>
        

        size change

         +       <widget class="QLabel" name="label_11">
         +        <property name="text">
         +         <string/>
         +        </property>
         +       </widget>
         +      </item>
         +      <item>
        

        Additional code

         -        <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;br/&gt;This is not experiment,This is our real life and great history.Our goal is to let you have a good time.&lt;/p&gt;&lt;p&gt;&lt;br/&gt;Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit     -license.php.&lt;/p&gt;&lt;p&gt;This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young ([email protected]) and UPnP software written by Thomas Bernard.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
        

        Code removed

         +        <string>This is not experiment,This is our real life and great history.</string>
        

        Code added ?? review

         +        <bool>false</bool>
        

        code change defaults

         +       <widget class="QLabel" name="label_8">
         +        <property name="text">
         +         <string>Our goal is to let you have a good time.</string>
         +        </property>
         +       </widget>
         +      </item>
         +      <item>
         +       <widget class="QLabel" name="label_12">
         +        <property name="text">
         +         <string/>
         +        </property>
         +       </widget>
         +      </item>
         +      <item>
         +       <widget class="QLabel" name="label_3">
         +        <property name="text">
         +         <string>Distributed under the MIT/X11 software license, see the accompanying file</string>
         +        </property>
         +       </widget>
         +      </item>
         +      <item>
         +       <widget class="QLabel" name="label_6">
         +        <property name="text">
         +         <string>COPYING or http://www.opensource.org/licenses/mit-license.php.</string>
         +        </property>
         +       </widget>
         +      </item>
         +      <item>
         +       <widget class="QLabel" name="label_13">
         +        <property name="text">
         +         <string/>
         +        </property>
         +       </widget>
         +      </item>
         +      <item>
         +       <widget class="QLabel" name="label_5">
         +        <property name="text">
         +         <string>This product includes software developed by the OpenSSL Project for use</string>
         +        </property>
         +       </widget>
         +      </item>
         +      <item>
         +       <widget class="QLabel" name="label_7">
         +        <property name="text">
         +         <string>in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic</string>
         +        </property>
         +       </widget>
         +      </item>
         +      <item>
         +       <widget class="QLabel" name="label_9">
         +        <property name="text">
         +         <string>software written by Eric Young ([email protected]) and UPnP software</string>
         +        </property>
         +       </widget>
         +      </item>
         +      <item>
         +       <widget class="QLabel" name="label_10">
         +        <property name="text">
         +         <string>written by Thomas Bernard.</string>
         +        </property>
         +       </widget>
         +      </item>
         +      <item>
        

        Code added

         -  <include location="C:/Users/lizhi.lizhi-PC/.designer/feathercoin.qrc"/>
        

        Code removed, noted from before?

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

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

          update merchantlist : - commit

          https://github.com/FeatherCoin/Feathercoin/commit/61959aba3255810c33aae1d7f9e72a32f2de3e85

          src/qt/forms/merchantlist.ui

           +    <width>805</width>
          

          Code updated

           +            <property name="cursor">
           +             <cursorShape>PointingHandCursor</cursorShape>
           +            </property>
           +            <property name="toolTip">
           +             <string>a altcoin currency exchange</string>
           +            </property>
          

          Code added

           +            <property name="pixmap">
           +             <pixmap resource="../feathercoin.qrc">:/images/merchant_vircurex</pixmap>
           +            </property>
          

          Code added

           +          <item>
           +           <spacer name="horizontalSpacer_4">
           +            <property name="orientation">
           +             <enum>Qt::Horizontal</enum>
           +            </property>
           +            <property name="sizeHint" stdset="0">
           +             <size>
           +              <width>40</width>
           +              <height>20</height>
           +             </size>
           +            </property>
           +           </spacer>
           +          </item>
          

          Code added

           +            <pixmap resource="../feathercoin.qrc">:/images/merchant_bittylicious</pixmap>
          

          Code replaced

           +           <spacer name="horizontalSpacer_5">
           +            <property name="orientation">
           +             <enum>Qt::Horizontal</enum>
           +            </property>
           +            <property name="sizeHint" stdset="0">
           +             <size>
           +              <width>40</width>
           +              <height>20</height>
           +             </size>
           +            </property>
           +           </spacer>
           +          </item>
           +          <item>
           +           <spacer name="horizontalSpacer_7">
           +            <property name="orientation">
           +             <enum>Qt::Horizontal</enum>
           +            </property>
           +            <property name="sizeHint" stdset="0">
           +             <size>
           +              <width>40</width>
           +              <height>20</height>
           +             </size>
           +            </property>
           +           </spacer>
           +          </item>
           +          <item>
          

          Code added

           +          <item>
           +           <spacer name="horizontalSpacer_6">
           +            <property name="orientation">
           +             <enum>Qt::Horizontal</enum>
           +            </property>
           +            <property name="sizeHint" stdset="0">
           +             <size>
           +              <width>40</width>
           +              <height>20</height>
           +             </size>
           +            </property>
           +           </spacer>
           +          </item>
          

          Code added

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

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

            update merchantlist : - commit

            https://github.com/FeatherCoin/Feathercoin/commit/61959aba3255810c33aae1d7f9e72a32f2de3e85

            src/qt/forms/shiftdialog.ui

            +    <height>428</height>
            
            +      <number>1</number>
            

            Code replaced

             +         <layout class="QHBoxLayout" name="horizontalLayout">
             +          <item>
             +           <widget class="QLabel" name="label_36">
             +            <property name="font">
             +             <font>
             +              <weight>75</weight>
             +              <bold>true</bold>
             +             </font>
             +            </property>
             +            <property name="text">
             +             <string>FTC/LTC</string>
             +            </property>
             +           </widget>
             +          </item>
             +          <item>
             +           <widget class="QLabel" name="label_37">
             +            <property name="text">
             +             <string>...</string>
             +            </property>
             +           </widget>
             +          </item>
             +          <item>
             +           <widget class="QLabel" name="label_38">
             +            <property name="font">
             +             <font>
             +              <underline>true</underline>
             +             </font>
             +            </property>
             +            <property name="text">
             +             <string>0.0001234</string>
             +            </property>
             +           </widget>
             +          </item>
             +          <item>
             +           <spacer name="horizontalSpacer_8">
             +            <property name="orientation">
             +             <enum>Qt::Horizontal</enum>
             +            </property>
             +            <property name="sizeType">
             +             <enum>QSizePolicy::Minimum</enum>
             +            </property>
             +            <property name="sizeHint" stdset="0">
             +             <size>
             +              <width>40</width>
             +              <height>20</height>
             +             </size>
             +            </property>
             +           </spacer>
             +          </item>
             +          <item>
             +           <widget class="QLabel" name="label_39">
             +            <property name="font">
             +             <font>
             +              <underline>true</underline>
             +             </font>
             +            </property>
             +            <property name="text">
             +             <string>1000</string>
             +            </property>
             +           </widget>
             +          </item>
             +          <item>
             +           <spacer name="horizontalSpacer_7">
             +            <property name="orientation">
             +             <enum>Qt::Horizontal</enum>
             +            </property>
             +            <property name="sizeHint" stdset="0">
             +             <size>
             +              <width>40</width>
             +              <height>20</height>
             +             </size>
             +            </property>
             +           </spacer>
             +          </item>
             +         </layout>
             +        </item>
             +        <item>
             +         <layout class="QHBoxLayout" name="horizontalLayout_2">
             +          <item>
             +           <widget class="QLabel" name="label_41">
             +            <property name="font">
             +             <font>
             +              <weight>75</weight>
             +              <bold>true</bold>
             +             </font>
             +            </property>
             +            <property name="text">
             +             <string>FTC/BC</string>
             +            </property>
             +           </widget>
             +          </item>
             +          <item>
             +           <widget class="QLabel" name="label_40">
             +            <property name="text">
             +             <string>....</string>
             +            </property>
             +           </widget>
             +          </item>
             +          <item>
             +           <widget class="QLabel" name="label_42">
             +            <property name="font">
             +             <font>
             +              <underline>true</underline>
             +             </font>
             +            </property>
             +            <property name="text">
             +             <string>0.0001234</string>
             +            </property>
             +           </widget>
             +          </item>
             +          <item>
             +           <spacer name="horizontalSpacer_10">
             +            <property name="orientation">
             +             <enum>Qt::Horizontal</enum>
             +            </property>
             +            <property name="sizeType">
             +             <enum>QSizePolicy::Minimum</enum>
             +            </property>
             +            <property name="sizeHint" stdset="0">
             +             <size>
             +              <width>40</width>
             +              <height>20</height>
             +             </size>
             +            </property>
             +           </spacer>
             +          </item>
             +          <item>
             +           <widget class="QLabel" name="label_43">
             +            <property name="font">
             +             <font>
             +              <underline>true</underline>
             +             </font>
             +            </property>
             +            <property name="text">
             +             <string>1000</string>
             +            </property>
             +           </widget>
             +          </item>
             +          <item>
             +           <spacer name="horizontalSpacer_9">
             +            <property name="orientation">
             +             <enum>Qt::Horizontal</enum>
             +            </property>
             +            <property name="sizeHint" stdset="0">
             +             <size>
             +              <width>40</width>
             +              <height>20</height>
             +             </size>
             +            </property>
             +           </spacer>
             +          </item>
             +         </layout>
             +        </item>
             +        <item>
            

            Code added

             +          <property name="sizeHint" stdset="0">
             +           <size>
             +            <width>0</width>
             +            <height>0</height>
             +           </size>
             +          </property>
            

            Code Added

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

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

              update merchantlist : - commit

              https://github.com/FeatherCoin/Feathercoin/commit/61959aba3255810c33aae1d7f9e72a32f2de3e85

              src/qt/locale/bitcoin_zh_CN.ts

              Very Large number of changes to translation file. translations and new referances

               + <TS language="zh_CN" version="2.1">
                <context>
                    <name>AboutDialog</name>
                    <name>AboutDialog</name>
                    <message>
               -        <location filename="../forms/aboutdialog.ui" line="     + 14"/>
               +         <source>About Feathercoin Core</source>
              
               +         <translation>关于羽毛币核心</translation>
              

              Start of code changes

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

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

                update merchantlist : - commit

                https://github.com/FeatherCoin/Feathercoin/commit/61959aba3255810c33aae1d7f9e72a32f2de3e85

                src/qt/merchantlist.cpp

                 + 	 		if (obj == ui->label_left_6) { 
                 + 	 	 	  QDesktopServices::openUrl(QUrl("https://vircurex.com/welcome/index?alt=btc&base=ftc"));
                 + 	 			return true; 
                 + 	 		}
                

                Code added

                 -	 	 	  QDesktopServices::openUrl(QUrl("https://mcxnow.com/exchange/FTC"));
                +	 	 	  QDesktopServices::openUrl(QUrl("https://bittylicious.com/"));
                

                Code replaced

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

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

                  update merchantlist : - commit

                  https://github.com/FeatherCoin/Feathercoin/commit/61959aba3255810c33aae1d7f9e72a32f2de3e85

                  src/qt/res/images/*

                   src/qt/res/images/bittylicious.png
                  
                   src/qt/res/images/bter.png
                  
                   src/qt/res/images/vircurex.png
                  

                  Images added

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

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

                    Add a head file : - commit

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

                    src/qt/qrcodedialog.h

                     + #ifndef QRCODEDIALOG_H
                     + #define QRCODEDIALOG_H
                     + 
                     + #include <QDialog>
                     + #include <QImage>
                     + 
                     + namespace Ui {
                     +     class QRCodeDialog;
                     + }
                     + class OptionsModel;
                     + 
                     + class QRCodeDialog : public QDialog
                     + {
                     +     Q_OBJECT
                     + 
                     + public:
                     +     explicit QRCodeDialog(const QString &addr, const QString &label, bool enableReq, QWidget *parent = 0);
                     +     ~QRCodeDialog();
                     + 
                     +     void setModel(OptionsModel *model);
                     + 
                     + private slots:
                     +     void on_lnReqAmount_textChanged();
                     +     void on_lnLabel_textChanged();
                     +     void on_lnMessage_textChanged();
                     +     void on_btnSaveAs_clicked();
                     +     void on_chkReqPayment_toggled(bool fChecked);
                     + 
                     +     void updateDisplayUnit();
                     + 
                     + private:
                     +     Ui::QRCodeDialog *ui;
                     +     OptionsModel *model;
                     +     QString address;
                     +     QImage myImage;
                     + 
                     +     void genCode();
                     +     QString getURI();
                     + };
                     + 
                     + #endif // QRCODEDIALOG_H
                    

                    New code / file

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

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

                      Add stealth address : - commit

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

                      src/Makefile.am

                       +  stealth.h \
                      
                       +  stealth.cpp \
                      

                      Add code

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

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

                        Add stealth address : - commit

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

                        src/base58.cpp

                         +        bool operator()(const CScriptID &id) const { return addr->Set(id); }   
                        
                         +        bool operator()(const CStealthAddress &stxAddr) const { return false; }
                        

                        Code added

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

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

                          Add stealth address : - commit

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

                          src/bitcoin-config.h

                           +/* Define to 1 libzxing must be available for support */
                           +#define USE_ZXING 1
                          

                          Code added

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

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

                            Add stealth address : - commit

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

                            src/crypter.cpp

                             +bool CCryptoKeyStore::LockKeyStore()
                            

                            Code replaced

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

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

                              Add stealth address : - commit

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

                              src/crypter.h

                               -    CryptedKeyMap mapCryptedKeys;
                               -
                               -    CKeyingMaterial vMasterKey;
                               -
                              

                              Code removed

                               +     CryptedKeyMap mapCryptedKeys;
                               + 
                               +     CKeyingMaterial vMasterKey;
                               + 
                              

                              Code added

                               +    //bool Lock();
                               +    bool LockKeyStore();
                              

                              code replaced

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

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

                                Add stealth address : - commit

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

                                src/key.cpp

                                 + bool CKey::SetSecret(const CSecret& vchSecret, bool fCompressedIn)
                                 + {
                                 +     if (vchSecret.size() != 32)
                                 +         return false;
                                 +         
                                 + 		CECKey key;       
                                 + 		key.SetSecretBytes(&vchSecret[0]);
                                 +     
                                 +     fCompressed = fCompressedIn;
                                 +     fValid = true;
                                 + 		return true;
                                 + 		
                                 +     /*EC_KEY_free(pkey);
                                 +     pkey = EC_KEY_new_by_curve_name(NID_secp256k1);
                                 +     if (pkey == NULL)
                                 +         return false;
                                 +     if (vchSecret.size() != 32)
                                 +         return false;
                                 +     BIGNUM *bn = BN_bin2bn(&vchSecret[0],32,BN_new());
                                 +     if (bn == NULL)
                                 +         return false;
                                 +     if (!EC_KEY_regenerate_key(pkey,bn))
                                 +     {
                                 +         BN_clear_free(bn);
                                 +         return false;
                                 +     }
                                 +     BN_clear_free(bn);
                                 +     fValid = true;
                                 +     if (fCompressed )
                                 +         SetCompressedPubKey();
                                 +     return true;*/
                                 + }
                                 + 
                                

                                Code added

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

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

                                  Add stealth address : - commit

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

                                  src/key.h

                                   +     std::vector<unsigned char> Raw() const {
                                   +     		std::vector<unsigned char> vchPubKey(begin(),end());  
                                   +         return vchPubKey;
                                   +     }
                                   +     
                                  

                                  Code added

                                    +// CSecret is a serialization of just the secret parameter (32 bytes)
                                   +typedef std::vector<unsigned char, secure_allocator<unsigned char> > CSecret;
                                  

                                  Code added

                                  +		bool SetSecret(const CSecret& vchSecret, bool fCompressed = false);
                                  

                                  Code added

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

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

                                    Add stealth address : - commit

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

                                    src/main.cpp

                                     +    unsigned int nTxnOut = 0;
                                    

                                    Code added

                                     +        {
                                             nDataOut++;
                                      +        } 
                                    

                                    Bracketing added

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

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

                                      Add stealth address : - commit

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

                                      src/qt/addressbookpage.cpp

                                       + 		ui->tableView->horizontalHeader()->resizeSection(0, 140);
                                       + 		ui->tableView->horizontalHeader()->resizeSection(1, 600);
                                      

                                      Code added

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

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

                                        Add stealth address : - commit

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

                                        src/qt/addresstablemodel.cpp

                                        + #include "stealth.h"
                                        
                                        + bool stealth;
                                        

                                        Code added

                                         +    AddressTableEntry(Type type, const QString &label, const QString &address, const bool &stealth = false):
                                         +        type(type), label(label), address(address), stealth(stealth) {}
                                        

                                        Code replaced

                                         +             std::set<CStealthAddress>::iterator it;
                                         +             for (it = wallet->stealthAddresses.begin(); it != wallet->stealthAddresses.end();      +      + it)
                                         +             {
                                         +                 bool fMine = !(it->scan_secret.size() < 1);
                                         +                 cachedAddressTable.append(AddressTableEntry(fMine ? AddressTableEntry::Receiving : AddressTableEntry::Sending,
                                         +                                   QString::fromStdString(it->label),
                                         +                                   QString::fromStdString(it->Encoded()),
                                         +                                   true));
                                         +             };
                                        

                                        Code added

                                          +    std::string strTemp, strValue;
                                        

                                        Code added

                                         -            wallet->SetAddressBook(curAddress, value.toString().toStdString(), strPurpose);
                                        

                                        Code removed

                                         +             //wallet->SetAddressBook(curAddress, value.toString().toStdString(), strPurpose);
                                         +             strTemp = rec->address.toStdString();
                                         +             if (IsStealthAddress(strTemp))
                                         +             {
                                         +                 strValue = value.toString().toStdString();
                                         +                 wallet->UpdateStealthAddress(strTemp, strValue, false);
                                         +             } else
                                         +             {
                                         +                 //wallet->SetAddressBookName(CBitcoinAddress(strTemp).Get(), value.toString().toStdString());
                                         +                 wallet->SetAddressBook(CBitcoinAddress(strTemp).Get(), value.toString().toStdString(), strPurpose);
                                         +    
                                        

                                        Code added

                                         +             std::string sTemp = value.toString().toStdString();
                                         +             if (IsStealthAddress(sTemp))
                                         +             {
                                         +                 printf("IsStealthAddress = INVALID_ADDRESS\n");
                                         +                 editStatus = INVALID_ADDRESS;
                                         +                 return false;
                                         +             }
                                        

                                        Code added

                                         - QString AddressTableModel::addRow(const QString &type, const QString &label, const QString &address)
                                         + QString AddressTableModel::addRow(const QString &type, const QString &label, const QString &address, int addressType)
                                        

                                        Code replaced

                                         +      /*  if(!walletModel->validateAddress(address))
                                        

                                        Code added

                                         +         }*/
                                         +         if (strAddress.length() > 75)
                                         +         {
                                         +             CStealthAddress sxAddr;
                                         +             if (!sxAddr.SetEncoded(strAddress))
                                         +             {
                                         +                 editStatus = INVALID_ADDRESS;
                                         +                 return QString();
                                         +             }
                                         +             
                                         +             // Check for duplicate addresses
                                         +             {
                                         +                 LOCK(wallet->cs_wallet);
                                         +                 
                                         +                 if (wallet->stealthAddresses.count(sxAddr))
                                         +                 {
                                         +                     editStatus = DUPLICATE_ADDRESS;
                                         +                     return QString();
                                         +                 };
                                         +                 
                                         +                 sxAddr.label = strLabel;
                                         +                 wallet->AddStealthAddress(sxAddr);
                                         +             }
                                         +         } else {
                                         +             if (!walletModel->validateAddress(address))
                                         +             {
                                         +                 editStatus = INVALID_ADDRESS;
                                         +                 return QString();
                                         +             }
                                         +             // Check for duplicate addresses
                                         +             {
                                         +                 LOCK(wallet->cs_wallet);
                                         +                 if (wallet->mapAddressBook.count(CBitcoinAddress(strAddress).Get()))
                                         +                 {
                                         +                     editStatus = DUPLICATE_ADDRESS;
                                         +                     return QString();
                                         +                 };
                                         +                 //wallet->SetAddressBookName(CBitcoinAddress(strAddress).Get(), strLabel);
                                         +                 wallet->SetAddressBook(CBitcoinAddress(strAddress).Get(), strLabel,(type == Send ? "send" : "receive"));
                                         +             }
                                        

                                        Code added

                                         -        CPubKey newKey;
                                         +       /* CPubKey newKey;
                                        

                                        Code removed

                                         +         */
                                         +         WalletModel::UnlockContext ctx(walletModel->requestUnlock());
                                         +         if(!ctx.isValid())
                                         +         {
                                         +             // Unlock wallet failed or was cancelled
                                         +             editStatus = WALLET_UNLOCK_FAILURE;
                                         +             return QString();
                                         +         }
                                         +         if (addressType == AT_Stealth)
                                         +         {
                                         +             CStealthAddress newStealthAddr;
                                         +             std::string sError;
                                         +             if (!wallet->NewStealthAddress(sError, strLabel, newStealthAddr)
                                         +                 || !wallet->AddStealthAddress(newStealthAddr))
                                         +             {
                                         +                 editStatus = KEY_GENERATION_FAILURE;
                                         +                 return QString();
                                         +             }
                                         +             strAddress = newStealthAddr.Encoded();
                                         +         } else {
                                         +             CPubKey newKey;
                                         +             //if(!wallet->GetKeyFromPool(newKey, true))
                                         +             if(!wallet->GetKeyFromPool(newKey))
                                         +             {
                                         +                 editStatus = KEY_GENERATION_FAILURE;
                                         +                 return QString();
                                         +             }
                                         +             strAddress = CBitcoinAddress(newKey.GetID()).ToString();
                                         +             
                                         +             {
                                         +                 LOCK(wallet->cs_wallet);
                                         +                 //wallet->SetAddressBookName(CBitcoinAddress(strAddress).Get(), strLabel);
                                         +                 wallet->SetAddressBook(CBitcoinAddress(strAddress).Get(), strLabel,(type == Send ? "send" : "receive"));
                                         +             }
                                         +         }
                                        

                                        Code added

                                        -    {
                                        +     /*{
                                             LOCK(wallet->cs_wallet);
                                              wallet->SetAddressBook(CBitcoinAddress(strAddress).Get(), strLabel,
                                                                    (type == Send ? "send" : "receive"));
                                        
                                         -    }
                                         +     }*/
                                        

                                        Bracketing removed

                                         +   /*  {
                                                 LOCK(wallet->cs_wallet);
                                                 CBitcoinAddress address_parsed(address.toStdString());
                                                 std::map<CTxDestination, CAddressBookData>::iterator mi = wallet->mapAddressBook.find(address_parsed.Get());
                                                 if (mi != wallet->mapAddressBook.end())
                                                 {
                                                     return QString::fromStdString(mi->second.name);
                                                 }
                                         +     }*/
                                        

                                        Bracketing commented out.

                                         +     {
                                         +         LOCK(wallet->cs_wallet);
                                         +         std::string sAddr = address.toStdString();
                                         +         
                                         +         if (sAddr.length() > 75)
                                         +         {
                                         +             CStealthAddress sxAddr;
                                         +             if (!sxAddr.SetEncoded(sAddr))
                                         +                 return QString();
                                         +             
                                         +             std::set<CStealthAddress>::iterator it;
                                         +             it = wallet->stealthAddresses.find(sxAddr);
                                         +             if (it == wallet->stealthAddresses.end())
                                         +                 return QString();
                                         +             
                                         +             return QString::fromStdString(it->label);
                                         +         } else
                                         +         {
                                         +             CBitcoinAddress address_parsed(sAddr);
                                         +             std::map<CTxDestination, CAddressBookData>::iterator mi = wallet->mapAddressBook.find(address_parsed.Get());
                                         +             if (mi != wallet->mapAddressBook.end())
                                         +             {
                                         +                 return QString::fromStdString(mi->second.name);
                                         +             }
                                         +         }
                                        

                                        Code added

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

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

                                          Add stealth address : - commit

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

                                          src/qt/addresstablemodel.h

                                           +     enum AddressType {
                                           +         AT_Unknown = 0, /**< User specified label */
                                           +         AT_Normal = 1,  /**< Bitcoin address */
                                           +         AT_Stealth = 2  /**< Stealth address */
                                           +     };
                                           +     
                                          

                                          Code added

                                           -        Address = 1  /**< Bitcoin address */
                                          +        Address = 1,  /**< Bitcoin address */
                                          +        Type = 2  /**< Address type  */
                                          

                                          ? review

                                           -    QString addRow(const QString &type, const QString &label, const QString &address);
                                           +     //QString addRow(const QString &type, const QString &label, const QString &address);
                                           +     QString addRow(const QString &type, const QString &label, const QString &address, int addressType);
                                          

                                          Bitcoin code commented out, review.

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

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

                                            Add stealth address : - commit

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

                                            src/qt/bitcoingui.cpp

                                             + 	
                                             + ActiveLabel::ActiveLabel(const QString & text, QWidget * parent):
                                             +     QLabel(parent){}
                                             + 
                                             + void ActiveLabel::mouseReleaseEvent(QMouseEvent * event)
                                             + {
                                             +     emit clicked();
                                             + }
                                            

                                            Code added

                                             +    walletModel(0),
                                            

                                            Code added

                                            -    labelEncryptionIcon = new QLabel();
                                            +    labelEncryptionIcon = new ActiveLabel();
                                            

                                            Code replaced

                                             +    connect(labelEncryptionIcon, SIGNAL(clicked()), unlockWalletAction, SLOT(trigger()));
                                            

                                            Code added

                                             +         disconnect(labelEncryptionIcon, SIGNAL(clicked()), unlockWalletAction, SLOT(trigger()));
                                             +         disconnect(labelEncryptionIcon, SIGNAL(clicked()),   lockWalletAction, SLOT(trigger()));
                                             +         connect   (labelEncryptionIcon, SIGNAL(clicked()),   lockWalletAction, SLOT(trigger()));
                                            

                                            Code added

                                             +         disconnect(labelEncryptionIcon, SIGNAL(clicked()), unlockWalletAction, SLOT(trigger()));
                                             +         disconnect(labelEncryptionIcon, SIGNAL(clicked()),   lockWalletAction, SLOT(trigger()));
                                             +         connect   (labelEncryptionIcon, SIGNAL(clicked()), unlockWalletAction, SLOT(trigger()));
                                            

                                            Code added

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