Skip to content

Commit

Permalink
unix build doc
Browse files Browse the repository at this point in the history
  • Loading branch information
galaxycash committed Mar 26, 2018
1 parent 9939912 commit f5f26b3
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 17 deletions.
34 changes: 17 additions & 17 deletions doc/build-unix.txt
Expand Up @@ -11,6 +11,18 @@ software written by Thomas Bernard.
UNIX BUILD NOTES
================

Dependencies
----------------------------------------------
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update

sudo apt-get install build-essential
sudo apt-get install libssl-dev
sudo apt-get install libdb4.8++-dev
sudo apt-get install libboost-all-dev
sudo apt-get install libqrencode-dev
sudo apt-get install libminiupnpc-dev

To Build
--------

Expand All @@ -19,14 +31,14 @@ qmake -makefile galaxycash.pro
make

Deamon
qmake -makefile galaxycashd.pro
make

or

cd src
make -f makefile.unix

or with qmake

qmake -makefile galaxycashd.pro
make


Versions used in this release:
GCC 7.2.0
Expand All @@ -37,15 +49,3 @@ Versions used in this release:
qrencode 3.4.4 (optional)

For build qt wallet need Qt5.6+ libraries.

Dependency Build Instructions: Ubuntu & Debian
----------------------------------------------
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update

sudo apt-get install build-essential
sudo apt-get install libssl-dev
sudo apt-get install libdb4.8++-dev
sudo apt-get install libboost-all-dev
sudo apt-get install libqrencode-dev
sudo apt-get install libminiupnpc-dev
28 changes: 28 additions & 0 deletions src/wallet.cpp
Expand Up @@ -1049,6 +1049,34 @@ void CWallet::ResendWalletTransactions(bool fForce)
// Actions
//

int64_t CWallet::GetAddressBalance(const CGalaxyCashAddress &address) const
{
int64_t nTotal = 0;
{
LOCK2(cs_main, cs_wallet);
for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
{
const CWalletTx* pcoin = &(*it).second;
if (pcoin->IsTrusted())
{
for (int i = 0; i < pcoin->vout.size(); i++)
{
const CTxOut &txout = pcoin->vout[i];

CTxDestination destination;
if (ExtractDestination(txout.scriptPubKey, destination))
{
CGalaxyCashAddress address2(destination);
if (address == address2)
nTotal += txout.nValue;
}
}
}
}
}

return nTotal;
}

int64_t CWallet::GetBalance() const
{
Expand Down
2 changes: 2 additions & 0 deletions src/wallet.h
Expand Up @@ -19,6 +19,7 @@
#include "script.h"
#include "ui_interface.h"
#include "util.h"
#include "base58.h"

// Settings
extern int64_t nTransactionFee;
Expand Down Expand Up @@ -228,6 +229,7 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
int ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate = false);
void ReacceptWalletTransactions();
void ResendWalletTransactions(bool fForce = false);
int64_t GetAddressBalance(const CGalaxyCashAddress &address) const;
int64_t GetBalance() const;
int64_t GetUnconfirmedBalance() const;
int64_t GetImmatureBalance() const;
Expand Down

0 comments on commit f5f26b3

Please sign in to comment.