Skip to content

Commit 63bb799

Browse files
Merge pull request #49 from DigitalNoteXDN/v1.0.3.4-testing
Sync master
2 parents d37836c + 6138fee commit 63bb799

238 files changed

Lines changed: 26303 additions & 689 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ src/build.h
1515
.qmake.stash
1616
Makefile
1717
DigitalNote-qt
18+
DigitalNote-Qt.dmg
19+
DigitalNote-Qt.app
1820
#resources cpp
1921
qrc_*.cpp
2022
#qt creator

DigitalNote.pro

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
TEMPLATE = app
22
TARGET = DigitalNote-qt
3-
VERSION = 1.0.2.6
3+
VERSION = 1.0.3.4
44
INCLUDEPATH += src src/json src/qt src/qt/plugins/mrichtexteditor
55
QT += core gui widgets network printsupport
66
DEFINES += ENABLE_WALLET
@@ -53,11 +53,11 @@ UI_DIR = build
5353

5454
# use: qmake "RELEASE=1"
5555
contains(RELEASE, 1) {
56-
# Mac: compile for maximum compatibility (10.12, 64-bit)
57-
macx:QMAKE_CXXFLAGS += -mmacosx-version-min=10.12 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
58-
macx:QMAKE_CFLAGS += -mmacosx-version-min=10.12 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
59-
macx:QMAKE_LFLAGS += -mmacosx-version-min=10.12 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
60-
macx:QMAKE_OBJECTIVE_CFLAGS += -mmacosx-version-min=10.12 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
56+
# Mac: compile for maximum compatibility (10.15, 64-bit)
57+
macx:QMAKE_CXXFLAGS += -mmacosx-version-min=10.13 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk
58+
macx:QMAKE_CFLAGS += -mmacosx-version-min=10.13 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk
59+
macx:QMAKE_LFLAGS += -mmacosx-version-min=10.13 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk
60+
macx:QMAKE_OBJECTIVE_CFLAGS += -mmacosx-version-min=10.13 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk
6161

6262

6363
!windows:!macx {
@@ -331,6 +331,7 @@ HEADERS += src/qt/bitcoingui.h \
331331
src/qt/adrenalinenodeconfigdialog.h \
332332
src/qt/qcustomplot.h \
333333
src/smessage.h \
334+
src/webwalletconnector.h \
334335
src/qt/messagepage.h \
335336
src/qt/messagemodel.h \
336337
src/qt/sendmessagesdialog.h \
@@ -453,6 +454,7 @@ SOURCES += src/qt/bitcoin.cpp src/qt/bitcoingui.cpp \
453454
src/qt/adrenalinenodeconfigdialog.cpp \
454455
src/qt/qcustomplot.cpp \
455456
src/smessage.cpp \
457+
src/webwalletconnector.cpp \
456458
src/qt/messagepage.cpp \
457459
src/qt/messagemodel.cpp \
458460
src/qt/sendmessagesdialog.cpp \
@@ -548,13 +550,14 @@ isEmpty(BDB_INCLUDE_PATH) {
548550
}
549551

550552
isEmpty(BOOST_LIB_PATH) {
551-
macx:BOOST_LIB_PATH = /usr/local/Cellar/boost/1.59.0/lib
553+
macx:BOOST_LIB_PATH = /usr/local/Cellar/boost/1.73.0/lib
552554
windows:BOOST_LIB_PATH=C:/deps/boost_1_74_0/lib
553555
}
554556

555557
isEmpty(BOOST_INCLUDE_PATH) {
556-
macx:BOOST_INCLUDE_PATH = /usr/local/Cellar/boost/1.59.0/include
558+
macx:BOOST_INCLUDE_PATH = /usr/local/Cellar/boost/1.73.0/include
557559
windows:BOOST_INCLUDE_PATH=C:/deps/boost_1_74_0/include
560+
558561
}
559562

560563
isEmpty(QRENCODE_LIB_PATH) {
@@ -572,18 +575,18 @@ isEmpty(MINIUPNPC_LIB_SUFFIX) {
572575
}
573576

574577
isEmpty(MINIUPNPC_INCLUDE_PATH) {
575-
macx:MINIUPNPC_INCLUDE_PATH=/usr/local/Cellar/miniupnpc/1.9.20151008/include
578+
macx:MINIUPNPC_INCLUDE_PATH= /usr/local/Cellar/miniupnpc/2.1/include
576579
windows:MINIUPNPC_INCLUDE_PATH=C:/deps/miniupnpc
577580
}
578581

579582
isEmpty(MINIUPNPC_LIB_PATH) {
580-
macx:MINIUPNPC_LIB_PATH=/usr/local/Cellar/miniupnpc/1.9.20151008/lib
583+
macx:MINIUPNPC_LIB_PATH= /usr/local/Cellar/miniupnpc/2.1/lib
581584
windows:MINIUPNPC_LIB_PATH=C:/deps/miniupnpc
582585
}
583586

584587
isEmpty(OPENSSL_INCLUDE_PATH) {
585588
macx:OPENSSL_INCLUDE_PATH = /usr/local/Cellar/openssl@1.1/1.1.1g/include
586-
windows:OPENSSL_INCLUDE_PATH=C:/dev/coindeps32/openssl-1.0.1p/lib
589+
windows:OPENSSL_INCLUDE_PATH=C:/deps/openssl-1.0.2u/include
587590
}
588591

589592
isEmpty(OPENSSL_LIB_PATH) {
@@ -609,7 +612,7 @@ macx:HEADERS += src/qt/macdockiconhandler.h src/qt/macnotificationhandler.h
609612
macx:OBJECTIVE_SOURCES += src/qt/macdockiconhandler.mm src/qt/macnotificationhandler.mm
610613
macx:LIBS += -framework Foundation -framework ApplicationServices -framework AppKit -framework CoreServices
611614
macx:DEFINES += MAC_OSX MSG_NOSIGNAL=0
612-
macx:ICON = src/qt/res/icons/bitcoin.icns
615+
macx:ICON = src/qt/res/icons/digitalnote.icns
613616
macx:TARGET = "DigitalNote-Qt"
614617
macx:QMAKE_CFLAGS_THREAD += -pthread
615618
macx:QMAKE_LFLAGS_THREAD += -pthread

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ General Specs
5050
Port: 18092
5151
RPC Port: 18094
5252

53+
BUILD MacOS
54+
-----------
55+
See /docs/build-osx.md
5356

5457
BUILD LINUX
5558
-----------

contrib/macdeploy/background.png

4.37 KB
Loading

contrib/macdeploy/background.psd

23.9 KB
Binary file not shown.

doc/build-osx.md

Lines changed: 106 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,113 @@
1-
Copyright (c) 2009-2012 Bitcoin Developers
2-
Distributed under the MIT/X11 software license, see the accompanying file
3-
license.txt or http://www.opensource.org/licenses/mit-license.php. This
4-
product includes software developed by the OpenSSL Project for use in the
5-
OpenSSL Toolkit (http://www.openssl.org/). This product includes cryptographic
6-
software written by Eric Young (eay@cryptsoft.com) and UPnP software written by
7-
Thomas Bernard.
1+
Mac OS X DigitalNoted build instructions vgulkevic. Find me on Discord if you have any issues - https://discordapp.com/invite/4dUquty
82

9-
10-
Mac OS X DigitalNoted build instructions
11-
Laszlo Hanyecz <solar@heliacal.net>
12-
Douglas Huff <dhuff@jrbobdobbs.org>
13-
14-
15-
See readme-qt.rst for instructions on building DigitalNote QT, the
16-
graphical user interface.
17-
18-
Tested on 10.5 and 10.6 intel. PPC is not supported because it's big-endian.
19-
20-
All of the commands should be executed in Terminal.app.. it's in
21-
/Applications/Utilities
3+
- Tested on 10.15.7.
224

235
You need to install XCode with all the options checked so that the compiler and
24-
everything is available in /usr not just /Developer I think it comes on the DVD
25-
but you can get the current version from http://developer.apple.com
26-
27-
28-
1. Clone the github tree to get the source code:
29-
30-
git clone http://github.com/DigitalNotedev/DigitalNote DigitalNote
31-
32-
2. Download and install MacPorts from http://www.macports.org/
33-
34-
2a. (for 10.7 Lion)
35-
Edit /opt/local/etc/macports/macports.conf and uncomment "build_arch i386"
36-
37-
3. Install dependencies from MacPorts
38-
39-
sudo port install boost db48 openssl miniupnpc
40-
41-
Optionally install qrencode (and set USE_QRCODE=1):
42-
sudo port install qrencode
43-
44-
4. Now you should be able to build DigitalNoted:
45-
46-
cd DigitalNote/src
47-
make -f makefile.osx
6+
everything is available in /usr not just /Developer
7+
You can get the current version from http://developer.apple.com
8+
9+
1. Clone the github tree to get the source code
10+
11+
```git clone https://github.com/CryptoCoderz/DigitalNote DigitalNote```
12+
13+
2. Install dependencies using Homebrew
14+
1. Install dependencies:
15+
```
16+
brew install boost
17+
brew install miniupnpc
18+
brew install openssl
19+
brew install automake
20+
brew install autoconf
21+
brew install libtool
22+
brew install qrencode
23+
```
24+
2. Install Berkeley-DB@6
25+
Download:
26+
27+
```
28+
curl -OL http://download.oracle.com/berkeley-db/db-6.2.32.tar.gz
29+
```
30+
31+
Unzip:
32+
```
33+
tar -xf db-6.2.32.tar.gz
34+
```
35+
Build:
36+
```
37+
cd db-6.2.32/build_unix &&
38+
../dist/configure --prefix=/usr/local/Cellar/berkeley-db@6.2.32 \
39+
--enable-cxx &&
40+
make
41+
```
42+
43+
If you get compile errors in `atomic.c` you need to apply a small patch and run the 'build' command above again:
44+
```
45+
cd ../..
46+
curl -OL https://raw.githubusercontent.com/macports/macports-ports/cb92cb90bdc7fb90212e928db32172546eca0f5b/databases/db60/files/patch-src_dbinc_atomic.h
47+
mv patch-src_dbinc_atomic.h db-6.2.32
48+
cd db-6.2.32
49+
patch -s -p0 < patch-src_dbinc_atomic.h
50+
cd ..
51+
```
52+
53+
Install:
54+
```
55+
inside db-6.2.32/build_unix folder run:
56+
57+
sudo make install
58+
```
59+
3. You might need to create a symlink if `openssl/sha.h` or any other header from openssl/ folder cannot be found when building DigitalNoted:
60+
```
61+
cd /usr/local/include
62+
ln -s ../opt/openssl/include/openssl .
63+
```
64+
Your compiler will search in this directory (one of many standard directories) and find the header file sha.h via the shortcut link.
65+
4. Now create a symlink to miniupnpc files since it is installed in a folder without a version appended and source files are expecting a version:
66+
```
67+
cd /usr/local/include
68+
ln -s ../opt/miniupnpc/include/miniupnpc ./miniupnpc-2.1
69+
```
70+
5. Check the versions of dependencies in src/makefile.osx and amend to match yours if required
71+
72+
3. Now you should be able to build DigitalNoted. Either use makefile to build daemon only or see the Step 3 of the section below (DigitalNote-qt: Qt5 GUI Release for DigitalNote) that uses .pro file:
73+
74+
```
75+
cd DigitalNote/src
76+
make -f makefile.osx
77+
```
4878
4979
Run:
50-
./DigitalNoted --help # for a list of command-line options.
80+
`./DigitalNoted --help`
81+
for a list of command-line options.
82+
5183
Run
52-
./DigitalNoted -daemon # to start the DigitalNote daemon.
84+
`./DigitalNoted -daemon`
85+
to start the DigitalNote daemon.
86+
5387
Run
54-
./DigitalNoted help # When the daemon is running, to get a list of RPC commands
88+
`./DigitalNoted help`
89+
When the daemon is running, to get a list of RPC commands
90+
91+
92+
DigitalNote-qt: Qt5 GUI Release for DigitalNote
93+
-----------------------------------------
94+
95+
1. Install dependencies:
96+
```
97+
brew install qrencode
98+
brew install qt5
99+
brew install protobuf
100+
brew install python2.7
101+
sudo easy_install appscript
102+
```
103+
2. Link qt5:
104+
```
105+
brew link qt5 --force
106+
```
107+
3. Run in the ./DigitalNote-2
108+
```
109+
qmake RELEASE=1 USE_UPNP=1 USE_QRCODE=1 DigitalNote.pro
110+
make
111+
python2.7 contrib/macdeploy/macdeployqtplus DigitalNote-Qt.app -add-qt-tr da,de,es,hu,ru,uk,zh_CN,zh_TW -dmg -fancy contrib/macdeploy/fancy.plist
112+
```
113+

share/qt/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<plist version="0.9">
44
<dict>
55
<key>CFBundleIconFile</key>
6-
<string>bitcoin.icns</string>
6+
<string>digitalnote.icns</string>
77
<key>CFBundlePackageType</key>
88
<string>APPL</string>
99
<key>CFBundleGetInfoString</key>

src/bignum.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
#include "uint256.h"
1111
#include "version.h"
1212

13+
#ifdef WIN32
14+
#include <windows.h>
15+
#endif
16+
1317
#include <openssl/bn.h>
1418

1519
#include <stdexcept>

src/blockparams.cpp

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "main.h"
1818
#include "mnengine.h"
1919
#include "masternodeman.h"
20+
#include "masternode-payments.h"
2021

2122
#include <boost/random/mersenne_twister.hpp>
2223
#include <boost/random/uniform_int_distribution.hpp>
@@ -477,6 +478,31 @@ unsigned int GetNextTargetRequired(const CBlockIndex* pindexLast, bool fProofOfS
477478
// Idle Duration : 5 Intervals (no adjustment)
478479
//
479480

481+
//
482+
// Masternode Select Payout Toggle
483+
//
484+
bool fMNselect(int nHeight)
485+
{
486+
// Try to get frist masternode in our list
487+
CMasternode* winningNode = mnodeman.GetCurrentMasterNode(1);
488+
// If initial sync or we can't find a masternode in our list
489+
if(IsInitialBlockDownload() || !winningNode){
490+
// Return false (for sanity, we have no masternode to pay)
491+
LogPrintf("MasterNode Select Validation : Either still syncing or no masternodes found\n");
492+
return false;
493+
}
494+
// Set TX values
495+
CScript payee;
496+
CTxIn vin;
497+
//spork
498+
if(masternodePayments.GetWinningMasternode(nHeight, payee, vin)){
499+
LogPrintf("MasterNode Select Validation: SUCCEEDED\n");
500+
return true;
501+
}
502+
return false;
503+
}
504+
505+
480506
//
481507
// PoW coin base reward
482508
//

src/blockparams.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ void VRX_ThreadCurve(const CBlockIndex* pindexLast, bool fProofOfStake);
4040
void VRX_Dry_Run(const CBlockIndex* pindexLast);
4141
unsigned int VRX_Retarget(const CBlockIndex* pindexLast, bool fProofOfStake);
4242
unsigned int GetNextTargetRequired(const CBlockIndex* pindexLast, bool fProofOfStake);
43+
extern bool fMNselect(int nHeight);
4344
int64_t GetProofOfWorkReward(int nHeight, int64_t nFees);
4445
int64_t GetProofOfStakeReward(const CBlockIndex* pindexPrev, int64_t nCoinAge, int64_t nFees);
4546
int64_t GetMasternodePayment(int nHeight, int64_t blockValue);

0 commit comments

Comments
 (0)