Skip to content

Commit

Permalink
SWAP V3.0.0 NEW BLOCKCHAIN!
Browse files Browse the repository at this point in the history
  • Loading branch information
ParsiCoin committed Mar 20, 2019
1 parent c043009 commit 82671f2
Show file tree
Hide file tree
Showing 93 changed files with 7,315 additions and 1,436 deletions.
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

31 changes: 19 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ include_directories(${CMAKE_BINARY_DIR}
cryptonote/include
cryptonote/src
libqrencode)

# set (CMAKE_PREFIX_PATH "/usr/local/Cellar/qt/5.11.1/") # uncomment if you are building on osx (change "5.11.1" with whatever qt5 verion you installed.)
# set (CMAKE_PREFIX_PATH "/usr/local/Cellar/qt/5.12.0/") # uncomment if you are building on osx (change "5.12.0" with whatever qt5 verion you installed.)

find_package(Qt5Gui REQUIRED)
find_package(Qt5Widgets REQUIRED)
Expand Down Expand Up @@ -49,7 +49,7 @@ add_definitions(-DGIT_REVISION=\"${GIT_REVISION}\")
set(CMAKE_AUTOMOC ON)

set(CRYPTONOTE_SOURCES
cryptonote/external/miniupnpc/connecthostport.c
cryptonote/external/miniupnpc/connecthostport.c
cryptonote/external/miniupnpc/igd_desc_parse.c
cryptonote/external/miniupnpc/minisoap.c
cryptonote/external/miniupnpc/miniupnpc.c
Expand All @@ -67,6 +67,7 @@ cryptonote/external/miniupnpc/connecthostport.c
cryptonote/src/Common/ConsoleTools.cpp
cryptonote/src/Common/MemoryInputStream.cpp
cryptonote/src/Common/PathTools.cpp
cryptonote/src/Common/DnsTools.cpp
cryptonote/src/Common/StdInputStream.cpp
cryptonote/src/Common/StdOutputStream.cpp
cryptonote/src/Common/StreamTools.cpp
Expand Down Expand Up @@ -195,7 +196,7 @@ if (WIN32)
endif ()
add_definitions(/D_CRT_SECURE_NO_WARNINGS /D_WIN32_WINNT=0x0600 /DSTATICLIB)
include_directories(cryptonote/src/platform/msc)

set( CMAKE_CXX_FLAGS "-bigobj -EHsc")
set(PLATFORM_DIR Windows)
set(BUILD_PLATFORM WIN32)
set(BUILD_RESOURCES src/cryptonotewallet.rc)
Expand Down Expand Up @@ -247,7 +248,12 @@ set(CRYPTONOTE_SOURCES ${CRYPTONOTE_SOURCES} ${PLATFORM_SOURCES})
add_library(${CRYPTONOTE_LIB} STATIC ${CRYPTONOTE_SOURCES})
add_library(Mnemonics ${Mnemonics})
set_target_properties(${CRYPTONOTE_LIB} PROPERTIES COMPILE_DEFINITIONS _GNU_SOURCE)

if (APPLE OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
target_link_libraries(${CRYPTONOTE_LIB} ${Boost_LIBRARIES} -lresolv)
else ()
target_link_libraries(${CRYPTONOTE_LIB} ${Boost_LIBRARIES})
endif ()
set_target_properties(Mnemonics PROPERTIES COMPILE_DEFINITIONS _GNU_SOURCE)
target_link_libraries(Mnemonics ${Boost_LIBRARIES})

Expand All @@ -270,8 +276,8 @@ qt5_use_modules(${PROJECT_NAME} Widgets Gui Network)

set(CPACK_PACKAGE_NAME ${CN_PROJECT_NAME})
set(CPACK_PACKAGE_VERSION ${CN_VERSION})
set(CPACK_PACKAGE_VENDOR "parsicoin-project")
set(CPACK_PACKAGE_CONTACT "https://parsicoin.net")
set(CPACK_PACKAGE_VENDOR "ParsiCoin-project")
set(CPACK_PACKAGE_CONTACT "http://parsicoin.net")
set(CPACK_STRIP_FILES ON)
if (APPLE)
set(CPACK_GENERATOR DragNDrop)
Expand All @@ -284,7 +290,8 @@ elseif (UNIX)
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
install(FILES src/parsipay.desktop DESTINATION share/applications)
install(FILES src/images/parsicoinz.png DESTINATION share/pixmaps RENAME parsicoin.png)
install(FILES copyright DESTINATION share/doc/parsicoin)
install(FILES copyright DESTINATION share/doc/parsipay)
install(DIRECTORY src/languages DESTINATION /opt/parsicoin/ FILES_MATCHING PATTERN "*.qm")

if (NOT RPMBUILD)
set(CPACK_GENERATOR DEB)
Expand All @@ -294,8 +301,8 @@ elseif (UNIX)
set(CPACK_DEBIAN_PACKAGE_SECTION Office)
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "ParsiCoin PARS wallet
Parsicoin is a decentralized, privacy oriented peer-to-peer
cryptocurrency. It is open-source, nobody owns or controls Parsicoin
ParsiCoin is a decentralized, privacy oriented peer-to-peer
cryptocurrency. It is open-source, nobody owns or controls ParsiCoin
and everyone can take part.")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_DEBIAN_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${VERSION_RELEASE}${CPACK_SYSTEM_NAME}")
else()
Expand All @@ -307,8 +314,8 @@ set(CPACK_PACKAGE_FILE_NAME "${CPACK_DEBIAN_PACKAGE_NAME}-${CPACK_PACKAGE_VERSIO
set(CPACK_RPM_PACKAGE_REQUIRES "qt5-qtbase >= 5.3.2, qt5-qtbase-gui >= 5.3.2")
set(CPACK_RPM_PACKAGE_SUMMARY "ParsiCoin PARS wallet")
set(CPACK_RPM_PACKAGE_DESCRIPTION "ParsiCoin PARS wallet
Parsicoin is a decentrilized, privacy oriented peer-to-peer
cryptocurrency. It is open-source, nobody owns or controls Parsicoin
ParsiCoin is a decentrilized, privacy oriented peer-to-peer
cryptocurrency. It is open-source, nobody owns or controls ParsiCoin
and everyone can take part.")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${VERSION_RELEASE}${CPACK_SYSTEM_NAME}")
endif ()
Expand All @@ -317,4 +324,4 @@ elseif (WIN32)
set(CPACK_GENERATOR ZIP)
endif (APPLE)

include(CPack)
include(CPack)
2 changes: 1 addition & 1 deletion CryptoNoteWallet.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
set(CN_PROJECT_NAME "parsipay")
set(CN_CURRENCY_DISPLAY_NAME "ParsiCoin")
set(CN_CURRENCY_TICKER "PARS")
set(CN_VERSION 2.0.1)
set(CN_VERSION 3.0.0)
165 changes: 165 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.


This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.

0. Additional Definitions.

As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.

"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.

An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.

A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".

The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.

The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.

1. Exception to Section 3 of the GNU GPL.

You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.

2. Conveying Modified Versions.

If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:

a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or

b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.

3. Object Code Incorporating Material from Library Header Files.

The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:

a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.

b) Accompany the object code with a copy of the GNU GPL and this license
document.

4. Combined Works.

You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:

a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.

b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.

c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.

d) Do one of the following:

0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.

1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.

e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)

5. Combined Libraries.

You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:

a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.

b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.

6. Revised Versions of the GNU Lesser General Public License.

The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.

If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
3 changes: 1 addition & 2 deletions src/AddressProvider.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2011-2016 The Cryptonote developers
// Copyright (c) 2015-2016 XDN developers
// Copyright (c) 2016 Karbowanec developers
// Copyright (c) 2018 The ParsiCoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down Expand Up @@ -44,7 +43,7 @@ void AddressProvider::readyRead() {

QJsonObject obj = doc.object();

QString address = obj.value("hyrjMmPhaznQkJD6C9dcmbBH9y6r9vYAg2aTG9CHSzL1R89xrFi7wj1azmkXyLPiWDBeTCsKGMmr6JzygbP2ZGSN2JqWs1WcK").toString();
QString address = obj.value("PARSGnjdcRG4gY9g4rMTFAEHZLGU7uK8YMiFY3Do1uzoMz4LMA6PqmdPp7ZxDu25b56RyhCevkWjbAMng532iFFj8L5RaPyT4s").toString();

if (!address.isEmpty()) {
Q_EMIT addressFoundSignal(address);
Expand Down
1 change: 0 additions & 1 deletion src/CommandLineParser.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright (c) 2011-2015 The Cryptonote developers
// Copyright (c) 2016 Karbowanec developers
// Copyright (c) 2018 The ParsiCoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down
31 changes: 21 additions & 10 deletions src/CryptoNoteWrapper.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright (c) 2011-2015 The Cryptonote developers
// Copyright (c) 2016-2017 The Karbowanec developers
// Copyright (c) 2018 The ParsiCoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down Expand Up @@ -200,6 +199,10 @@ class RpcNode : CryptoNote::INodeObserver, public Node {
return m_node.getPeerCount();
}

uint64_t getMinimalFee() {
return m_node.getMinimalFee();
}

uint64_t getDifficulty() {
try {
CryptoNote::COMMAND_RPC_GET_INFO::request req;
Expand Down Expand Up @@ -443,15 +446,19 @@ class InprocessNode : CryptoNote::INodeObserver, public Node {
m_core(currency, &m_protocolHandler, logManager, true),
m_nodeServer(m_dispatcher, m_protocolHandler, logManager),
m_node(m_core, m_protocolHandler) {
CryptoNote::Checkpoints checkpoints(logManager);
for (const CryptoNote::CheckpointData& checkpoint : CryptoNote::CHECKPOINTS) {
checkpoints.add_checkpoint(checkpoint.height, checkpoint.blockId);
}
if (!Settings::instance().isTestnet()) {
m_core.set_checkpoints(std::move(checkpoints));
}
m_core.set_cryptonote_protocol(&m_protocolHandler);
m_protocolHandler.set_p2p_endpoint(&m_nodeServer);

CryptoNote::Checkpoints checkpoints(logManager);
checkpoints.load_checkpoints_from_dns();
for (const CryptoNote::CheckpointData& checkpoint : CryptoNote::CHECKPOINTS) {
checkpoints.add_checkpoint(checkpoint.height, checkpoint.blockId);
}
if (!Settings::instance().isTestnet()) {
m_core.set_checkpoints(std::move(checkpoints));
}

m_core.set_cryptonote_protocol(&m_protocolHandler);
m_protocolHandler.set_p2p_endpoint(&m_nodeServer);

}

~InprocessNode() override {
Expand Down Expand Up @@ -561,6 +568,10 @@ class InprocessNode : CryptoNote::INodeObserver, public Node {
return m_nodeServer.getPeerlistManager().get_gray_peers_count();
}

uint64_t getMinimalFee() {
return m_core.getMinimalFee();
}

CryptoNote::BlockHeaderInfo getLastLocalBlockHeaderInfo() {
return m_node.getLastLocalBlockHeaderInfo();
}
Expand Down
2 changes: 1 addition & 1 deletion src/CryptoNoteWrapper.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright (c) 2011-2015 The Cryptonote developers
// Copyright (c) 2016-2017 The Karbowanec developers
// Copyright (c) 2018 The ParsiCoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down Expand Up @@ -49,6 +48,7 @@ class Node {
virtual uint64_t getIncomingConnectionsCount() = 0;
virtual uint64_t getWhitePeerlistSize() = 0;
virtual uint64_t getGreyPeerlistSize() = 0;
virtual uint64_t getMinimalFee() = 0;
virtual uint8_t getCurrentBlockMajorVersion() = 0;
virtual CryptoNote::BlockHeaderInfo getLastLocalBlockHeaderInfo() = 0;

Expand Down
1 change: 0 additions & 1 deletion src/CurrencyAdapter.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright (c) 2011-2015 The Cryptonote developers
// Copyright (c) 2016-2018 The Karbowanec developers
// Copyright (c) 2018 The ParsiCoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down
1 change: 0 additions & 1 deletion src/CurrencyAdapter.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright (c) 2011-2015 The Cryptonote developers
// Copyright (c) 2016-2018 The Karbowanec developers
// Copyright (c) 2018 The ParsiCoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down
1 change: 0 additions & 1 deletion src/DnsLookup.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// Copyright (c) 2016-2017 The Karbovanets developers
// Copyright (c) 2018 The ParsiCoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down
Loading

0 comments on commit 82671f2

Please sign in to comment.