Skip to content

Commit

Permalink
Merge pull request #6 from CarmeloCampos/master
Browse files Browse the repository at this point in the history
Fix GUI 2.0.2
  • Loading branch information
CarmeloCampos authored Sep 16, 2023
2 parents f9b994f + 5e12706 commit 1ce37ab
Show file tree
Hide file tree
Showing 80 changed files with 758 additions and 653 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ set(SERVER_SOURCES
./src/txmempool.cpp
./src/validation.cpp
./src/validationinterface.cpp
./src/zpivchain.cpp
./src/zktvchain.cpp
)
add_library(SERVER_A STATIC ${BitcoinHeaders} ${SERVER_SOURCES})
if(MINIUPNP_FOUND)
Expand Down Expand Up @@ -274,7 +274,7 @@ set(WALLET_SOURCES
./src/wallet/wallet.cpp
./src/wallet/walletdb.cpp
./src/wallet/walletutil.cpp
./src/zktv/zpivmodule.cpp
./src/zktv/zktvmodule.cpp
./src/zktv/zpos.cpp
./src/stakeinput.cpp
)
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 2)
define(_CLIENT_VERSION_MINOR, 0)
define(_CLIENT_VERSION_REVISION, 1)
define(_CLIENT_VERSION_REVISION, 2)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_RC, 0)
define(_CLIENT_VERSION_IS_RELEASE, true)
Expand Down
2 changes: 1 addition & 1 deletion contrib/debian/examples/ktv.conf
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
# both prior transactions and several dozen future transactions.
#keypool=100

# Pay an optional transaction fee every time you send PIVs. Transactions with fees
# Pay an optional transaction fee every time you send KTVs. Transactions with fees
# are more likely than free transactions to be included in generated blocks, so may
# be validated sooner.
#paytxfee=0.00
Expand Down
6 changes: 3 additions & 3 deletions contrib/spendfrom/spendfrom.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Use the raw transactions API to spend PIVs received on particular addresses,
# Use the raw transactions API to spend KTVs received on particular addresses,
# and send any change back to that same address.
#
# Example usage:
Expand Down Expand Up @@ -221,9 +221,9 @@ def main():

parser = optparse.OptionParser(usage="%prog [options]")
parser.add_option("--from", dest="fromaddresses", default=None,
help="addresses to get PIVs from")
help="addresses to get KTVs from")
parser.add_option("--to", dest="to", default=None,
help="address to get send PIVs to")
help="address to get send KTVs to")
parser.add_option("--amount", dest="amount", default=None,
help="amount to send")
parser.add_option("--fee", dest="fee", default="0.0",
Expand Down
4 changes: 2 additions & 2 deletions doc/developer-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ to see it.

### Testnet and Regtest modes

Run with the `-testnet` option to run with "play PIVs (tPIV)" on the test network, if you
Run with the `-testnet` option to run with "play KTVs (tKTV)" on the test network, if you
are testing multi-machine code that needs to operate across the internet.

If you are testing something that can run on one machine, run with the `-regtest` option.
Expand Down Expand Up @@ -345,7 +345,7 @@ Threads

- ThreadRPCServer : Remote procedure call handler, listens on port 8332 for connections and services them.

- BitcoinMiner : Generates PIVs (if wallet is enabled).
- BitcoinMiner : Generates KTVs (if wallet is enabled).

- Shutdown : Does an orderly shutdown of everything.

Expand Down
2 changes: 1 addition & 1 deletion doc/man/ktvd.1
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ Copyright (C) 2009-2021 The Bitcoin Core Developers

Copyright (C) 2014-2021 The Dash Core Developers

Copyright (C) 2015-2021 The PIVX Developers
Copyright (C) 2015-2021 The PIVX developers

Copyright (C) 2019-2021 The KTV Developers

Expand Down
2 changes: 1 addition & 1 deletion doc/release-notes/release-notes-3.3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ Detailed release notes follow. This overview includes changes that affect behavi
### Core
- #875 `a99c2dd3bb` [Zerocoin] GMP BigNum: Fix limits for random number generators (random-zebra)
- #888 `0c071c3fd0` [Zerocoin] remove CTransaction::IsZerocoinSpend/IsZerocoinMint (random-zebra)
- #891 `855408c2c3` [ZPIV] Zerocoin public coin spend. (furszy)
- #891 `855408c2c3` [ZKTV] Zerocoin public coin spend. (furszy)
- #897 `65bd788945` [zKTV] Disable zerocoin minting (random-zebra)
- #899 `4b22a09024` [zKTV] Disable zKTV staking (random-zebra)
- #909 `458b08c8f2` [Consensus] Mainnet public spend enforcement height set. (furszy)
Expand Down
2 changes: 1 addition & 1 deletion doc/release-notes/release-notes-5.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ New SHIELD Protocol Implemented!
--------------------------------

#### Overview
Users will be able to protect their financial information by sending and receiving PIVs privately, as well as sending and receiving encrypted messages attached to the shield transactions.
Users will be able to protect their financial information by sending and receiving KTVs privately, as well as sending and receiving encrypted messages attached to the shield transactions.
More visual information about the protocol can be found at https://kmushicoin.co .

#### GUI features
Expand Down
2 changes: 1 addition & 1 deletion doc/release-notes/release-notes-5.3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ The `autocombine` RPC command has been replaced ([PR #2248](https://github.com/k
Mine blocks immediately to a specified address (before the RPC call returns)
Arguments:
1. nblocks (numeric, required) How many blocks are generated immediately.
2. "address" (string, required) The address to send the newly generated PIVs to.
2. "address" (string, required) The address to send the newly generated KTVs to.
Result:
[ blockhashes ] (array) hashes of blocks generated
```
Expand Down
6 changes: 3 additions & 3 deletions src/consensus/zerocoin_verify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ static bool CheckZerocoinSpend(const CTransactionRef _tx, CValidationState& stat
}
libzerocoin::ZerocoinParams* params = consensus.Zerocoin_Params(false);
PublicCoinSpend publicSpend(params);
if (!ZPIVModule::parseCoinSpend(txin, tx, prevOut, publicSpend)){
if (!ZKTVModule::parseCoinSpend(txin, tx, prevOut, publicSpend)){
return state.DoS(100, error("%s: public zerocoin spend parse failed", __func__));
}
newSpend = publicSpend;
Expand All @@ -82,7 +82,7 @@ static bool CheckZerocoinSpend(const CTransactionRef _tx, CValidationState& stat
if (isPublicSpend) {
libzerocoin::ZerocoinParams* params = consensus.Zerocoin_Params(false);
PublicCoinSpend ret(params);
if (!ZPIVModule::validateInput(txin, prevOut, tx, ret)){
if (!ZKTVModule::validateInput(txin, prevOut, tx, ret)){
return state.DoS(100, error("%s: public zerocoin spend did not verify", __func__));
}
}
Expand Down Expand Up @@ -262,7 +262,7 @@ bool ParseAndValidateZerocoinSpends(const Consensus::Params& consensus,
if (isPublicSpend) {
libzerocoin::ZerocoinParams* params = consensus.Zerocoin_Params(false);
PublicCoinSpend publicSpend(params);
if (!ZPIVModule::ParseZerocoinPublicSpend(txIn, tx, state, publicSpend)) {
if (!ZKTVModule::ParseZerocoinPublicSpend(txIn, tx, state, publicSpend)) {
return false;
}
//queue for db write after the 'justcheck' section has concluded
Expand Down
2 changes: 1 addition & 1 deletion src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ std::string LicenseInfo()
"\n" +
FormatParagraph(strprintf(_("Copyright (C) 2014-%i The Dash Core Developers"), COPYRIGHT_YEAR)) + "\n" +
"\n" +
FormatParagraph(strprintf(_("Copyright (C) 2015-%i The PIVX Developers"), COPYRIGHT_YEAR)) + "\n" +
FormatParagraph(strprintf(_("Copyright (C) 2015-%i The PIVX developers"), COPYRIGHT_YEAR)) + "\n" +
"\n" +
FormatParagraph(strprintf(_("Copyright (C) 2019-%i The KTV Developers"), COPYRIGHT_YEAR)) + "\n" +
"\n" +
Expand Down
4 changes: 2 additions & 2 deletions src/kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static bool LoadStakeInput(const CBlock& block, std::unique_ptr<CStakeInput>& st
const CTxIn& txin = block.vtx[1]->vin[0];
stake = txin.IsZerocoinSpend() ?
std::unique_ptr<CStakeInput>(CLegacyZKtvStake::NewZKtvStake(txin, nHeight)) :
std::unique_ptr<CStakeInput>(CKtvStake::NewPivStake(txin, nHeight, block.nTime));
std::unique_ptr<CStakeInput>(CKtvStake::NewKtvStake(txin, nHeight, block.nTime));

return stake != nullptr;
}
Expand Down Expand Up @@ -156,7 +156,7 @@ bool CheckProofOfStake(const CBlock& block, std::string& strError, const CBlockI
}

// zPoS disabled (ContextCheck) before blocks V7, and the tx input signature is in CoinSpend
if (stakeInput->IsZPIV()) return true;
if (stakeInput->IsZKTV()) return true;

// Verify tx input signature
CTxOut stakePrevout;
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/stakemodifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ bool GetOldStakeModifier(CStakeInput* stake, uint64_t& nStakeModifier)
{
const CBlockIndex* pindexFrom = stake->GetIndexFrom();
if (!pindexFrom) return error("%s : failed to get index from", __func__);
if (stake->IsZPIV()) {
if (stake->IsZKTV()) {
int64_t nTimeBlockFrom = pindexFrom->GetBlockTime();
const int nHeightStop = std::min(chainActive.Height(), Params().GetConsensus().height_last_ZC_AccumCheckpoint-1);
while (pindexFrom && pindexFrom->nHeight + 1 <= nHeightStop) {
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/validation_zerocoin_legacy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ bool DisconnectZerocoinTx(const CTransaction& tx)
if (isPublicSpend) {
PublicCoinSpend publicSpend(params);
CValidationState state;
if (!ZPIVModule::ParseZerocoinPublicSpend(txin, tx, state, publicSpend)) {
if (!ZKTVModule::ParseZerocoinPublicSpend(txin, tx, state, publicSpend)) {
return error("Failed to parse public spend");
}
serial = publicSpend.getCoinSerialNumber();
Expand Down
2 changes: 1 addition & 1 deletion src/qt/askpassphrasedialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ void AskPassphraseDialog::warningMessage()
"<qt>" +
tr("%1 will close now to finish the encryption process. "
"Remember that encrypting your wallet cannot fully protect "
"your PIVs from being stolen by malware infecting your computer.").arg(PACKAGE_NAME) +
"your KTVs from being stolen by malware infecting your computer.").arg(PACKAGE_NAME) +
"<br><br><b>" +
tr("IMPORTANT: Any previous backups you have made of your wallet file "
"should be replaced with the newly generated, encrypted wallet file. "
Expand Down
2 changes: 1 addition & 1 deletion src/qt/askpassphrasedialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class AskPassphraseDialog : public QDialog, public Runnable
Encrypt, /** Encrypt unencrypted wallet */
ToggleLock, /** Toggle wallet lock state */
ChangePass, /** Change passphrase */
Send_PIV, /** Send KTV */
Send_KTV, /** Send KTV */
BIP_38, /** BIP38 menu */
Multi_Sig, /** Multi-Signature dialog */
Sign_Message, /** Sign/verify message dialog */
Expand Down
8 changes: 4 additions & 4 deletions src/qt/bitcoinunits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ QString BitcoinUnits::formatHtmlWithUnit(int unit, const CAmount& amount, bool p
return QString("<span style='white-space: nowrap;'>%1</span>").arg(str);
}

QString BitcoinUnits::floorWithUnit(int unit, const CAmount& amount, bool plussign, SeparatorStyle separators, bool cleanRemainderZeros, bool isZPIV)
QString BitcoinUnits::floorWithUnit(int unit, const CAmount& amount, bool plussign, SeparatorStyle separators, bool cleanRemainderZeros, bool isZKTV)
{
QSettings settings;
int digits = settings.value("digits").toInt();
Expand All @@ -233,12 +233,12 @@ QString BitcoinUnits::floorWithUnit(int unit, const CAmount& amount, bool plussi
}
}

return result + QString(" ") + name(unit, isZPIV);
return result + QString(" ") + name(unit, isZKTV);
}

QString BitcoinUnits::floorHtmlWithUnit(int unit, const CAmount& amount, bool plussign, SeparatorStyle separators, bool cleanRemainderZeros, bool isZPIV)
QString BitcoinUnits::floorHtmlWithUnit(int unit, const CAmount& amount, bool plussign, SeparatorStyle separators, bool cleanRemainderZeros, bool isZKTV)
{
QString str(floorWithUnit(unit, amount, plussign, separators, cleanRemainderZeros, isZPIV));
QString str(floorWithUnit(unit, amount, plussign, separators, cleanRemainderZeros, isZKTV));
str.replace(QChar(THIN_SP_CP), QString(COMMA_HTML));
return QString("<span style='white-space: nowrap;'>%1</span>").arg(str);
}
Expand Down
4 changes: 2 additions & 2 deletions src/qt/bitcoinunits.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ class BitcoinUnits : public QAbstractListModel
static QString formatWithUnit(int unit, const CAmount& amount, bool plussign = false, SeparatorStyle separators = separatorStandard);
static QString formatHtmlWithUnit(int unit, const CAmount& amount, bool plussign = false, SeparatorStyle separators = separatorStandard);
//! Format as string (with unit) but floor value up to "digits" settings
static QString floorWithUnit(int unit, const CAmount& amount, bool plussign = false, SeparatorStyle separators = separatorStandard, bool cleanRemainderZeros = false, bool isZPIV = false);
static QString floorHtmlWithUnit(int unit, const CAmount& amount, bool plussign = false, SeparatorStyle separators = separatorStandard, bool cleanRemainderZeros = false, bool isZPIV = false);
static QString floorWithUnit(int unit, const CAmount& amount, bool plussign = false, SeparatorStyle separators = separatorStandard, bool cleanRemainderZeros = false, bool isZKTV = false);
static QString floorHtmlWithUnit(int unit, const CAmount& amount, bool plussign = false, SeparatorStyle separators = separatorStandard, bool cleanRemainderZeros = false, bool isZKTV = false);
//! Parse string to coin amount
static bool parse(int unit, const QString& value, CAmount* val_out);
//! Gets title for amount column including current display unit if optionsModel reference available */
Expand Down
10 changes: 5 additions & 5 deletions src/qt/ktv/addresseswidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,15 +187,15 @@ void AddressesWidget::onStoreContactClicked()
QString address = ui->lineEditAddress->text();

bool isStakingAddress = false;
auto pivAdd = Standard::DecodeDestination(address.toUtf8().constData(), isStakingAddress);
auto ktvAdd = Standard::DecodeDestination(address.toUtf8().constData(), isStakingAddress);

if (!Standard::IsValidDestination(pivAdd)) {
if (!Standard::IsValidDestination(ktvAdd)) {
setCssEditLine(ui->lineEditAddress, false, true);
inform(tr("Invalid Contact Address"));
return;
}

if (walletModel->isMine(pivAdd)) {
if (walletModel->isMine(ktvAdd)) {
setCssEditLine(ui->lineEditAddress, false, true);
inform(tr("Cannot store your own address as contact"));
return;
Expand All @@ -208,8 +208,8 @@ void AddressesWidget::onStoreContactClicked()
return;
}

bool isShielded = walletModel->IsShieldedDestination(pivAdd);
if (walletModel->updateAddressBookLabels(pivAdd, label.toUtf8().constData(),
bool isShielded = walletModel->IsShieldedDestination(ktvAdd);
if (walletModel->updateAddressBookLabels(ktvAdd, label.toUtf8().constData(),
isShielded ? AddressBook::AddressBookPurpose::SHIELDED_SEND :
isStakingAddress ? AddressBook::AddressBookPurpose::COLD_STAKING_SEND : AddressBook::AddressBookPurpose::SEND)
) {
Expand Down
2 changes: 1 addition & 1 deletion src/qt/ktv/forms/addresseswidget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@
<item>
<widget class="QLineEdit" name="lineEditAddress">
<property name="placeholderText">
<string notr="true">e.g. D8FpnBdmahyJNRsVzoKzyFHbGjcUbX43QN</string>
<string notr="true">e.g. KhrRWgUPrM3WNuEpdB5Cc8tvmL9UmGm3oD</string>
</property>
</widget>
</item>
Expand Down
2 changes: 1 addition & 1 deletion src/qt/ktv/forms/coldstakingwidget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
</size>
</property>
<property name="text">
<string>You can delegate your PIVs, letting a hot node (24/7 online node)
<string>You can delegate your KTVs, letting a hot node (24/7 online node)
stake on your behalf, while you keep the keys securely offline.</string>
</property>
</widget>
Expand Down
2 changes: 1 addition & 1 deletion src/qt/ktv/forms/sendchangeaddressdialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
</size>
</property>
<property name="placeholderText">
<string notr="true">e.g. D8FpnBdmahyJNRsVzoKzyFHbGjcUbX43QN</string>
<string notr="true">e.g. KhrRWgUPrM3WNuEpdB5Cc8tvmL9UmGm3oD</string>
</property>
</widget>
</item>
Expand Down
Loading

0 comments on commit 1ce37ab

Please sign in to comment.