diff --git a/.qmake.stash b/.qmake.stash
deleted file mode 100644
index 5d3a3825..00000000
--- a/.qmake.stash
+++ /dev/null
@@ -1,24 +0,0 @@
-QMAKE_CXX.INCDIRS = \
- /usr/include/c++/7 \
- /usr/include/x86_64-linux-gnu/c++/7 \
- /usr/include/c++/7/backward \
- /usr/lib/gcc/x86_64-linux-gnu/7/include \
- /usr/local/include \
- /usr/lib/gcc/x86_64-linux-gnu/7/include-fixed \
- /usr/include/x86_64-linux-gnu \
- /usr/include
-QMAKE_CXX.LIBDIRS = \
- /usr/lib/gcc/x86_64-linux-gnu/7 \
- /usr/lib/x86_64-linux-gnu \
- /usr/lib \
- /lib/x86_64-linux-gnu \
- /lib
-QMAKE_CXX.QT_COMPILER_STDCXX = 201402L
-QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 7
-QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 2
-QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 0
-QMAKE_CXX.COMPILER_MACROS = \
- QT_COMPILER_STDCXX \
- QMAKE_GCC_MAJOR_VERSION \
- QMAKE_GCC_MINOR_VERSION \
- QMAKE_GCC_PATCH_VERSION
diff --git a/README.md b/README.md
index 53e063f4..d2c42ae4 100644
--- a/README.md
+++ b/README.md
@@ -61,6 +61,20 @@ ASCII CAST TUTORIALS
[![asciicast](https://asciinema.org/a/179362.png)](https://asciinema.org/a/179362)
[![asciicast](https://asciinema.org/a/179355.png)](https://asciinema.org/a/179355)
+denariusqtubuntu.sh by Buzzkillb
+===========================
+Compile the latest Denarius QT (Graphical Wallet) Ubuntu 16.04 or Ubuntu 18.04.1
+
+Credits to Buzzkillb for the creation of this bash script, original repository: https://github.com/buzzkillb/denarius-qt/
+
+Compiles Denarius QT Ubuntu 16.04 or 18.04, Grabs latest chaindata, and populates denarius.conf with addnodes or can update a previous compile to the latest master branch.
+```bash -c "$(wget -O - https://raw.githubusercontent.com/carsenk/denarius/master/denariusqtubuntu.sh)"```
+
+To turn on nativetor in denarius.conf
+```nativetor=1```
+
+![Denarius Installer Menu](https://raw.githubusercontent.com/buzzkillb/denarius-qt/master/compile-menu.PNG)
+
Development process
===========================
diff --git a/denarius-qt.pro b/denarius-qt.pro
index c61ee888..0f396e38 100644
--- a/denarius-qt.pro
+++ b/denarius-qt.pro
@@ -1,6 +1,6 @@
TEMPLATE = app
TARGET = Denarius
-VERSION = 3.3.6.0
+VERSION = 3.3.7.0
INCLUDEPATH += src src/json src/qt src/tor src/qt/plugins/mrichtexteditor
DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE
CONFIG += no_include_pwd
@@ -18,6 +18,10 @@ greaterThan(QT_MAJOR_VERSION, 4) {
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
}
+linux {
+ QMAKE_CFLAGS += -std=gnu99
+}
+
win32 {
BOOST_LIB_SUFFIX=-mgw49-mt-s-1_57
BOOST_INCLUDE_PATH=C:/deps/boost_1_57_0
@@ -730,10 +734,11 @@ macx:ICON = src/qt/res/icons/denarius.icns
macx:TARGET = "Denarius"
macx:QMAKE_CFLAGS_THREAD += -pthread
macx:QMAKE_LFLAGS_THREAD += -pthread
-macx:QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7
-macx:QMAKE_MAC_SDK = macosx10.11
+macx:QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
+macx:QMAKE_MAC_SDK = macosx10.14
macx:QMAKE_CXXFLAGS_THREAD += -pthread
macx:QMAKE_RPATHDIR = @executable_path/../Frameworks
+macx:QMAKE_CXXFLAGS += -stdlib=libc++
# Set libraries and includes at end, to use platform-defined defaults if not overridden
diff --git a/denariusqtubuntu.sh b/denariusqtubuntu.sh
new file mode 100644
index 00000000..0dc52023
--- /dev/null
+++ b/denariusqtubuntu.sh
@@ -0,0 +1,117 @@
+#!/bin/bash
+TEMP=/tmp/answer$$
+whiptail --title "Denarius [D]" --menu "Ubuntu 16.04/18.04 QT Wallet :" 20 0 0 1 "Compile Denarius QT Ubuntu 16.04" 2 "Update Denarius QT 16.04 to v3.4 latest" 3 "Compile Denarius QT Ubuntu 18.04" 4 "Update Denarius QT 18.04 to v3.4 latest" 2>$TEMP
+choice=`cat $TEMP`
+case $choice in
+1) echo 1 "Compiling Denarius QT Ubuntu 16.04"
+
+echo "Updating linux packages"
+sudo apt-get update -y && apt-get upgrade -y
+
+sudo apt-get --assume-yes install git unzip build-essential libssl-dev libdb++-dev libboost-all-dev libqrencode-dev libminiupnpc-dev libevent-dev autogen automake libtool libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools
+
+sudo apt-get --assume-yes install qt5-default
+
+echo "Installing Denarius Wallet"
+git clone https://github.com/carsenk/denarius
+cd denarius || exit
+git checkout master
+git pull
+
+#echo "Change line in denarius-qt.pro from stdlib=c99 to stdlib=gnu99"
+#sed -i 's/c99/gnu99/' ~/denarius/denarius-qt.pro
+
+qmake "USE_QRCODE=1" "USE_UPNP=1" denarius-qt.pro
+make
+
+echo "Populate denarius.conf"
+mkdir ~/.denarius
+echo -e "nativetor=0\naddnode=denarius.host\naddnode=denarius.win\naddnode=denarius.pro\naddnode=triforce.black" > ~/.denarius/denarius.conf
+
+echo "Get Chaindata"
+cd ~/.denarius || exit
+rm -rf database txleveldb smsgDB
+#wget http://d.hashbag.cc/chaindata.zip
+#unzip chaindata.zip
+wget https://github.com/carsenk/denarius/releases/download/v3.3.6/chaindata1612994.zip
+unzip chaindata1612994.zip
+rm chaindata1612994.zip
+Echo "Back to Compiled QT Binary Folder"
+cd ~/denarius/src
+ ;;
+2) echo 2 "Update Denarius QT"
+echo "Updating Denarius Wallet"
+cd ~/denarius || exit
+git checkout master
+git pull
+
+#echo "Change line in denarius-qt.pro from stdlib=c99 to stdlib=gnu99"
+#sed -i 's/c99/gnu99/' ~/denarius/denarius-qt.pro
+
+qmake "USE_QRCODE=1" "USE_UPNP=1" denarius-qt.pro
+make
+Echo "Back to Compiled QT Binary Folder"
+cd ~/denarius/src
+ ;;
+3) echo 3 "Compile Denarius QT Ubuntu 18.04"
+echo "Updating linux packages"
+sudo apt-get update -y && apt-get upgrade -y
+
+sudo apt-get --assume-yes install git unzip build-essential libdb++-dev libboost-all-dev libqrencode-dev libminiupnpc-dev libevent-dev autogen automake libtool libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools
+
+sudo apt-get --assume-yes install qt5-default
+
+echo "Downgrade libssl-dev"
+sudo apt-get install make
+wget https://www.openssl.org/source/openssl-1.0.1j.tar.gz
+tar -xzvf openssl-1.0.1j.tar.gz
+cd openssl-1.0.1j
+sudo ./config
+sudo make install
+sudo ln -sf /usr/local/ssl/bin/openssl `which openssl`
+cd ~
+openssl version -v
+
+echo "Installing Denarius Wallet"
+git clone https://github.com/carsenk/denarius
+cd denarius
+git checkout master
+git pull
+
+#echo "Change line in denarius-qt.pro from stdlib=c99 to stdlib=gnu99"
+#sed -i 's/c99/gnu99/' ~/denarius/denarius-qt.pro
+
+qmake "USE_UPNP=1" "USE_QRCODE=1" OPENSSL_INCLUDE_PATH=/usr/local/ssl/include OPENSSL_LIB_PATH=/usr/local/ssl/lib denarius-qt.pro
+make
+
+echo "Populate denarius.conf"
+mkdir ~/.denarius
+echo -e "nativetor=0\naddnode=denarius.host\naddnode=denarius.win\naddnode=denarius.pro\naddnode=triforce.black" > ~/.denarius/denarius.conf
+
+echo "Get Chaindata"
+cd ~/.denarius
+rm -rf database txleveldb smsgDB
+#wget http://d.hashbag.cc/chaindata.zip
+#unzip chaindata.zip
+wget https://github.com/carsenk/denarius/releases/download/v3.3.6/chaindata1612994.zip
+unzip chaindata1612994.zip
+chaindata1612994.zip
+Echo "Back to Compiled QT Binary Folder"
+cd ~/denarius/src
+ ;;
+4) echo 4 "Update Denarius QT 18.04"
+echo "Updating Denarius Wallet"
+cd ~/denarius || exit
+git checkout master
+git pull
+
+#echo "Change line in denarius-qt.pro from stdlib=c99 to stdlib=gnu99"
+#sed -i 's/c99/gnu99/' ~/denarius/denarius-qt.pro
+
+qmake "USE_UPNP=1" "USE_QRCODE=1" OPENSSL_INCLUDE_PATH=/usr/local/ssl/include OPENSSL_LIB_PATH=/usr/local/ssl/lib denarius-qt.pro
+make
+Echo "Back to Compiled QT Binary Folder"
+cd ~/denarius/src
+ ;;
+esac
+echo Selected $choice
\ No newline at end of file
diff --git a/src/clientversion.h b/src/clientversion.h
index 2d5cce40..50bde07b 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -8,7 +8,7 @@
// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 3
#define CLIENT_VERSION_MINOR 3
-#define CLIENT_VERSION_REVISION 6
+#define CLIENT_VERSION_REVISION 7
#define CLIENT_VERSION_BUILD 0
// Converts the parameter X to a string after macro replacement on X has been performed.
diff --git a/src/fortunastake.cpp b/src/fortunastake.cpp
index 77179e0f..ab063d5b 100644
--- a/src/fortunastake.cpp
+++ b/src/fortunastake.cpp
@@ -1358,7 +1358,7 @@ struct MatchPubkey
void CFortunaPayments::update(const CBlockIndex *pindex, bool force)
{
- if (!pindex || IsInitialBlockDownload()) return 0;
+ if (!pindex || IsInitialBlockDownload()) return; //return 0 should not return value
const CBlockIndex *BlockReading = pindex;
int rewardCount = 0;
int64_t rewardValue = 0;
@@ -1436,7 +1436,7 @@ void CFortunaPayments::update(const CBlockIndex *pindex, bool force)
bool CFortunaPayments::initialize(const CBlockIndex *pindex)
{
- if (vCollaterals.size() > 0) return;
+ if (vCollaterals.size() > 0) return 0; //return should return value here
printf("Setting up FS payment validation...\n");
CTxDB txdb("r");
const CBlockIndex *BlockReading = pindex;
diff --git a/src/qt/forms/overviewpage.ui b/src/qt/forms/overviewpage.ui
index 027c7bf9..0a580f54 100644
--- a/src/qt/forms/overviewpage.ui
+++ b/src/qt/forms/overviewpage.ui
@@ -364,7 +364,7 @@
Qt::LeftToRight
- Refresh Totals
+ Refresh
@@ -545,7 +545,7 @@
PointingHandCursor
- <div style="color: #fff;">(<a href="https://www.cryptopia.co.nz/Exchange/?market=D_BTC" style="color: #fff;">Trade D</a>)</div>
+ <div style="color: #fff;">(<a href="https://www.coinexchange.io/market/D/BTC" style="color: #fff;">Trade D</a>)</div>
true
diff --git a/src/qt/fortunastakemanager.cpp b/src/qt/fortunastakemanager.cpp
index d022bf46..46511c57 100644
--- a/src/qt/fortunastakemanager.cpp
+++ b/src/qt/fortunastakemanager.cpp
@@ -221,7 +221,7 @@ void FortunastakeManager::updateAdrenalineNode(QString alias, QString addr, QStr
QTableWidgetItem *statusItem = new QTableWidgetItem(status);
QTableWidgetItem *collateralItem = new QTableWidgetItem(collateral);
SortedWidgetItem *rankItem = new SortedWidgetItem();
- SortedWidgetItem *payrateItem = new QTableWidgetItem(payrate);
+ SortedWidgetItem *payrateItem = new SortedWidgetItem();
rankItem->setData(Qt::UserRole, rank ? rank : 2000);
rankItem->setData(Qt::DisplayRole, rank > 0 && rank < 500000 ? QString::number(rank) : "");
@@ -396,7 +396,7 @@ void FortunastakeManager::updateNodeList()
QTableWidgetItem *statusItem = new QTableWidgetItem(nstatus);
QTableWidgetItem *collateralItem = new QTableWidgetItem(ncollateral);
SortedWidgetItem *nrankItem = new SortedWidgetItem();
- SortedWidgetItem *payrateItem = new QTableWidgetItem(npayrate);
+ SortedWidgetItem *payrateItem = new SortedWidgetItem();
nrankItem->setData(Qt::UserRole, mnRank ? mnRank : 2000);
nrankItem->setData(Qt::DisplayRole, mnRank > 0 && mnRank < 500000 ? QString::number(mnRank) : "");
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index a7d445ab..4f8de132 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -113,7 +113,7 @@ OverviewPage::OverviewPage(QWidget *parent) :
{
ui->setupUi(this);
- PriceRequest();
+ PriceRequest();
QObject::connect(&m_nam, SIGNAL(finished(QNetworkReply*)), this, SLOT(parseNetworkResponse(QNetworkReply*)));
connect(ui->refreshButton, SIGNAL(pressed()), this, SLOT( PriceRequest()));
@@ -138,7 +138,7 @@ void OverviewPage::PriceRequest()
getRequest(BaseURL);
getRequest(BaseURL2);
getRequest(BaseURL3);
- updateDisplayUnit(); //Maybe not?
+ //updateDisplayUnit(); //Segfault Fix
}
void OverviewPage::getRequest( const QString &urlString )
diff --git a/src/ringsig.cpp b/src/ringsig.cpp
index 494ee374..2f3347b8 100644
--- a/src/ringsig.cpp
+++ b/src/ringsig.cpp
@@ -29,17 +29,17 @@ int initialiseRingSigs()
printf("initialiseRingSigs()\n");
if (!(ecGrp = EC_GROUP_new_by_curve_name(NID_secp256k1)))
- return error(1, "initialiseRingSigs(): EC_GROUP_new_by_curve_name failed.");
+ printf("initialiseRingSigs(): EC_GROUP_new_by_curve_name failed.");
if (!(bnCtx = BN_CTX_new()))
- return error(1, "initialiseRingSigs(): BN_CTX_new failed.");
+ printf("initialiseRingSigs(): BN_CTX_new failed.");
BN_CTX_start(bnCtx);
// get order and cofactor
bnOrder = BN_new();
if (!EC_GROUP_get_order(ecGrp, bnOrder, bnCtx))
- return error(1, "initialiseRingSigs(): EC_GROUP_get_order failed.");
+ printf("initialiseRingSigs(): EC_GROUP_get_order failed.");
BN_CTX_end(bnCtx);
@@ -117,7 +117,7 @@ int getOldKeyImage(CPubKey &publicKey, ec_point &keyImage)
{
// - PublicKey * Hash(PublicKey)
if (publicKey.size() != EC_COMPRESSED_SIZE)
- return error(1, "%s: Invalid publicKey.", __func__);
+ printf("%s: Invalid publicKey.", __func__);
int rv = 0;
@@ -129,21 +129,21 @@ int getOldKeyImage(CPubKey &publicKey, ec_point &keyImage)
// Hash to BIGNUM
if (!BN_bin2bn(pkHash.begin(), EC_SECRET_SIZE, bnTmp)
- && (rv = error(1, "%s: BN_bin2bn failed.", __func__)))
+ && (rv = printf("%s: BN_bin2bn failed.", __func__)))
goto End;
// PublicKey point
if (!(ptPk = EC_POINT_new(ecGrp))
- && (rv = error(1, "%s: EC_POINT_new failed.", __func__)))
+ && (rv = printf("%s: EC_POINT_new failed.", __func__)))
goto End;
if (!EC_POINT_oct2point(ecGrp, ptPk, publicKey.begin(), EC_COMPRESSED_SIZE, bnCtx)
- && (rv = error(1, "%s: EC_POINT_oct2point failed.", __func__)))
+ && (rv = printf("%s: EC_POINT_oct2point failed.", __func__)))
goto End;
// PublicKey * Hash(PublicKey)
if (!EC_POINT_mul(ecGrp, ptPk, NULL, ptPk, bnTmp, bnCtx)
- && (rv = error(1, "%s: EC_POINT_mul failed.", __func__)))
+ && (rv = printf("%s: EC_POINT_mul failed.", __func__)))
goto End;
try { keyImage.resize(EC_COMPRESSED_SIZE); } catch (std::exception& e)
@@ -156,7 +156,7 @@ int getOldKeyImage(CPubKey &publicKey, ec_point &keyImage)
if (!(EC_POINT_point2bn(ecGrp, ptPk, POINT_CONVERSION_COMPRESSED, bnTmp, bnCtx))
||BN_num_bytes(bnTmp) != (int) EC_COMPRESSED_SIZE
||BN_bn2bin(bnTmp, &keyImage[0]) != (int) EC_COMPRESSED_SIZE)
- rv = error(1, "%s: point -> keyImage failed.", __func__);
+ rv = printf("%s: point -> keyImage failed.", __func__);
End:
EC_POINT_free(ptPk);
@@ -174,7 +174,7 @@ static int hashToEC(const uint8_t *p, uint32_t len, BIGNUM *bnTmp, EC_POINT *ptR
BN_one(bnOne);
if (!bnTmp || !BN_bin2bn(pkHash.begin(), EC_SECRET_SIZE, bnTmp))
- return error(1, "%s: BN_bin2bn failed.", __func__);
+ printf("%s: BN_bin2bn failed.", __func__);
if (fNew)
while(!EC_POINT_set_compressed_coordinates_GFp(ecGrp, ptRet, bnTmp, 0, bnCtx) && count < 100)
@@ -182,13 +182,13 @@ static int hashToEC(const uint8_t *p, uint32_t len, BIGNUM *bnTmp, EC_POINT *ptR
count += 1;
if (count == 100)
- return error(1, "%s: Failed to find a valid point for public key.", __func__);
+ printf("%s: Failed to find a valid point for public key.", __func__);
BN_add(bnTmp, bnTmp, bnOne);
}
else
if (!EC_POINT_mul(ecGrp, ptRet, bnTmp, NULL, NULL, bnCtx))
- return error(1, "%s: EC_POINT_mul failed.", __func__);
+ printf("%s: EC_POINT_mul failed.", __func__);
return 0;
}
@@ -199,7 +199,7 @@ int generateKeyImage(ec_point &publicKey, ec_secret secret, ec_point &keyImage)
// - keyImage = secret * hash(publicKey) * G
if (publicKey.size() != EC_COMPRESSED_SIZE)
- return error(1, "%s: Invalid publicKey.", __func__);
+ printf("%s: Invalid publicKey.", __func__);
BN_CTX_start(bnCtx);
int rv = 0;
@@ -208,19 +208,19 @@ int generateKeyImage(ec_point &publicKey, ec_secret secret, ec_point &keyImage)
EC_POINT *hG = NULL;
if (!(hG = EC_POINT_new(ecGrp))
- && (rv = error(1, "%s: EC_POINT_new failed.", __func__)))
+ && (rv = printf("%s: EC_POINT_new failed.", __func__)))
goto End;
if (hashToEC(&publicKey[0], publicKey.size(), bnTmp, hG, true)
- && (rv = error(1, "%s: hashToEC failed.", __func__)))
+ && (rv = printf("%s: hashToEC failed.", __func__)))
goto End;
if (!(BN_bin2bn(&secret.e[0], EC_SECRET_SIZE, bnSec))
- && (rv = error(1, "%s: BN_bin2bn failed.", __func__)))
+ && (rv = printf("%s: BN_bin2bn failed.", __func__)))
goto End;
if (!EC_POINT_mul(ecGrp, hG, NULL, hG, bnSec, bnCtx)
- && (rv = error(1, "%s: kimg EC_POINT_mul failed.", __func__)))
+ && (rv = printf("%s: kimg EC_POINT_mul failed.", __func__)))
goto End;
try { keyImage.resize(EC_COMPRESSED_SIZE); } catch (std::exception& e)
@@ -232,7 +232,7 @@ int generateKeyImage(ec_point &publicKey, ec_secret secret, ec_point &keyImage)
if ((!(EC_POINT_point2bn(ecGrp, hG, POINT_CONVERSION_COMPRESSED, bnTmp, bnCtx))
|| BN_num_bytes(bnTmp) != (int) EC_COMPRESSED_SIZE
|| BN_bn2bin(bnTmp, &keyImage[0]) != (int) EC_COMPRESSED_SIZE)
- && (rv = error(1, "%s: point -> keyImage failed.", __func__)))
+ && (rv = printf("%s: point -> keyImage failed.", __func__)))
goto End;
if (fDebugRingSig)
@@ -285,7 +285,7 @@ int generateRingSignature(data_chunk &keyImage, uint256 &txnHash, int nRingSize,
// ks = random 256 bit int mod P
if (GenerateRandomSecret(scData1)
- && (rv = error(1, "%s: GenerateRandomSecret failed.", __func__)))
+ && (rv = printf("%s: GenerateRandomSecret failed.", __func__)))
goto End;
if (!bnKS || !(BN_bin2bn(&scData1.e[0], EC_SECRET_SIZE, bnKS)))
@@ -315,7 +315,7 @@ int generateRingSignature(data_chunk &keyImage, uint256 &txnHash, int nRingSize,
// get keyimage as point
if (!EC_POINT_oct2point(ecGrp, ptKi, &keyImage[0], EC_COMPRESSED_SIZE, bnCtx)
- &&(rv = error(1, "%s: extract ptKi failed.", __func__)))
+ &&(rv = printf("%s: extract ptKi failed.", __func__)))
goto End;
for (int i = 0; i < nRingSize; ++i)
@@ -558,7 +558,7 @@ int verifyRingSignature(data_chunk &keyImage, uint256 &txnHash, int nRingSize, c
// get keyimage as point
if (!EC_POINT_oct2point(ecGrp, ptKi, &keyImage[0], EC_COMPRESSED_SIZE, bnCtx)
- &&(rv = error(1, "%s: extract ptKi failed.", __func__)))
+ &&(rv = printf("%s: extract ptKi failed.", __func__)))
goto End;
for (int i = 0; i < nRingSize; ++i)
@@ -715,7 +715,7 @@ int generateRingSignatureAB(data_chunk &keyImage, uint256 &txnHash, int nRingSiz
ec_secret sAlpha;
if (0 != GenerateRandomSecret(sAlpha))
- return error(1, "%s: GenerateRandomSecret failed.", __func__);
+ printf("%s: GenerateRandomSecret failed.", __func__);
CHashWriter ssPkHash(SER_GETHASH, PROTOCOL_VERSION);
CHashWriter ssCjHash(SER_GETHASH, PROTOCOL_VERSION);
@@ -733,7 +733,7 @@ int generateRingSignatureAB(data_chunk &keyImage, uint256 &txnHash, int nRingSiz
for (k = 0; k < 32; ++k)
{
if (1 != RAND_bytes(&pSigS[i * EC_SECRET_SIZE], 32))
- return error(1, "%s: RAND_bytes ERR_get_error %u.", __func__, ERR_get_error());
+ printf("%s: RAND_bytes ERR_get_error %u.", __func__, ERR_get_error());
memcpy(test.begin(), &pSigS[i * EC_SECRET_SIZE], 32);
if (test > MIN_SECRET && test < MAX_SECRET)
@@ -741,7 +741,7 @@ int generateRingSignatureAB(data_chunk &keyImage, uint256 &txnHash, int nRingSiz
}
if (k > 31)
- return error(1, "%s: Failed to generate a valid key.", __func__);
+ printf("%s: Failed to generate a valid key.", __func__);
}
tmpPkHash = ssPkHash.GetHash();
@@ -773,7 +773,7 @@ int generateRingSignatureAB(data_chunk &keyImage, uint256 &txnHash, int nRingSiz
// get keyimage as point
if (!EC_POINT_oct2point(ecGrp, ptKi, &keyImage[0], EC_COMPRESSED_SIZE, bnCtx)
- &&(rv = error(1, "%s: extract ptKi failed.", __func__)))
+ &&(rv = printf("%s: extract ptKi failed.", __func__)))
goto End;
// c_{j+1} = h(P_1,...,P_n,alpha*G,alpha*H(P_j))
@@ -927,12 +927,12 @@ int generateRingSignatureAB(data_chunk &keyImage, uint256 &txnHash, int nRingSiz
if ((!bnC
||!BN_bin2bn(tmpHash.begin(), EC_SECRET_SIZE, bnC) // bnC lags i by 1
||!BN_mod(bnC, bnC, bnOrder, bnCtx))
- && (rv = error(1, "%s: hash -> bnC failed.", __func__)))
+ && (rv = printf("%s: hash -> bnC failed.", __func__)))
goto End;
if (i == nSecretOffset
&&!BN_copy(bnCj, bnC)
- && (rv = error(1, "%s: BN_copy failed.\n", __func__)))
+ && (rv = printf("%s: BN_copy failed.\n", __func__)))
goto End;
if (i == 0)
@@ -975,9 +975,9 @@ int verifyRingSignatureAB(data_chunk &keyImage, uint256 &txnHash, int nRingSize,
// check c_{n+1}=c_1
if (sigC.size() != EC_SECRET_SIZE)
- return error(1, "%s: sigC size != EC_SECRET_SIZE.", __func__);
+ printf("%s: sigC size != EC_SECRET_SIZE.", __func__);
if (keyImage.size() != EC_COMPRESSED_SIZE)
- return error(1, "%s: keyImage size != EC_COMPRESSED_SIZE.", __func__);
+ printf("%s: keyImage size != EC_COMPRESSED_SIZE.", __func__);
int rv = 0;
@@ -1019,7 +1019,7 @@ int verifyRingSignatureAB(data_chunk &keyImage, uint256 &txnHash, int nRingSize,
// get keyimage as point
if (!EC_POINT_oct2point(ecGrp, ptKi, &keyImage[0], EC_COMPRESSED_SIZE, bnCtx)
- &&(rv = error(1, "%s: extract ptKi failed.", __func__)))
+ &&(rv = printf("%s: extract ptKi failed.", __func__)))
goto End;
if (!bnC1 || !BN_bin2bn(&sigC[0], EC_SECRET_SIZE, bnC1))