Skip to content

Commit

Permalink
SafeCash v1 (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssowellsvt committed Jul 30, 2018
1 parent 6331f55 commit 8ef8754
Show file tree
Hide file tree
Showing 625 changed files with 6,468 additions and 6,597 deletions.
18 changes: 9 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Contributing to Bitcoin Core
Contributing to SafeCash Official
============================

The Bitcoin Core project operates an open contributor model where anyone is
The SafeCash Official project operates an open contributor model where anyone is
welcome to contribute towards development in the form of peer review, testing
and patches. This document explains the practical process and guidelines for
contributing.
Expand Down Expand Up @@ -62,7 +62,7 @@ the pull request affects. Valid areas as:
- *Net* or *P2P* for changes to the peer-to-peer network code
- *RPC/REST/ZMQ* for changes to the RPC, REST or ZMQ APIs
- *Scripts and tools* for changes to the scripts and tools
- *Tests* for changes to the bitcoin unit tests or QA tests
- *Tests* for changes to the safecash unit tests or QA tests
- *Trivial* should **only** be used for PRs that do not change generated
executable code. Notably, refactors (change of function arguments and code
reorganization) and changes in behavior should **not** be marked as trivial.
Expand Down Expand Up @@ -169,11 +169,11 @@ workload on reviewing.
"Decision Making" Process
-------------------------

The following applies to code changes to the Bitcoin Core project (and related
projects such as libsecp256k1), and is not to be confused with overall Bitcoin
The following applies to code changes to the SafeCash Official project (and related
projects such as libsecp256k1), and is not to be confused with overall SafeCash
Network Protocol consensus changes.

Whether a pull request is merged into Bitcoin Core rests with the project merge
Whether a pull request is merged into SafeCash Official rests with the project merge
maintainers and ultimately the project lead.

Maintainers will take into consideration if a patch is in line with the general
Expand All @@ -191,7 +191,7 @@ In general, all pull requests must:
- Where bugs are fixed, where possible, there should be unit tests
demonstrating the bug and also proving the fix. This helps prevent regression.

Patches that change Bitcoin consensus rules are considerably more involved than
Patches that change SafeCash consensus rules are considerably more involved than
normal because they affect the entire ecosystem and so must be preceded by
extensive mailing list discussions and have a numbered BIP. While each case will
be different, one should be prepared to expend more time and effort than for
Expand Down Expand Up @@ -232,7 +232,7 @@ higher in terms of discussion and peer review requirements, keeping in mind that
mistakes could be very costly to the wider community. This includes refactoring
of consensus critical code.

Where a patch set proposes to change the Bitcoin consensus, it must have been
Where a patch set proposes to change the SafeCash consensus, it must have been
discussed extensively on the mailing list and IRC, be accompanied by a widely
discussed BIP and have a generally widely perceived technical consensus of being
a worthwhile change based on the judgement of the maintainers.
Expand Down Expand Up @@ -272,7 +272,7 @@ about:
Release Policy
--------------

The project leader is the release manager for each Bitcoin Core release.
The project leader is the release manager for each SafeCash Official release.

Copyright
---------
Expand Down
68 changes: 34 additions & 34 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ endif

export PYTHONPATH

if BUILD_BITCOIN_LIBS
if BUILD_SAFECASH_LIBS
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libsafecashconsensus.pc
endif

BITCOIND_BIN=$(top_builddir)/src/$(BITCOIN_DAEMON_NAME)$(EXEEXT)
BITCOIN_QT_BIN=$(top_builddir)/src/qt/$(BITCOIN_GUI_NAME)$(EXEEXT)
BITCOIN_CLI_BIN=$(top_builddir)/src/$(BITCOIN_CLI_NAME)$(EXEEXT)
BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EXEEXT)
SAFECASHD_BIN=$(top_builddir)/src/$(SAFECASH_DAEMON_NAME)$(EXEEXT)
SAFECASH_QT_BIN=$(top_builddir)/src/qt/$(SAFECASH_GUI_NAME)$(EXEEXT)
SAFECASH_CLI_BIN=$(top_builddir)/src/$(SAFECASH_CLI_NAME)$(EXEEXT)
SAFECASH_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EXEEXT)

empty :=
space := $(empty) $(empty)
Expand All @@ -33,7 +33,7 @@ OSX_BACKGROUND_IMAGE_DPIS=36 72
OSX_DSSTORE_GEN=$(top_srcdir)/contrib/macdeploy/custom_dsstore.py
OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus
OSX_FANCY_PLIST=$(top_srcdir)/contrib/macdeploy/fancy.plist
OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns
OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/safecash.icns
OSX_PLIST=$(top_builddir)/share/qt/Info.plist #not installed
OSX_QT_TRANSLATIONS = da,de,es,hu,ru,uk,zh_CN,zh_TW

Expand All @@ -51,7 +51,7 @@ DIST_SHARE = \
BIN_CHECKS=$(top_srcdir)/contrib/devtools/symbol-check.py \
$(top_srcdir)/contrib/devtools/security-check.py

WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \
WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/safecash.ico \
$(top_srcdir)/share/pixmaps/nsis-header.bmp \
$(top_srcdir)/share/pixmaps/nsis-wizard.bmp \
$(top_srcdir)/doc/README_windows.txt
Expand All @@ -63,18 +63,18 @@ OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) \
$(top_srcdir)/contrib/macdeploy/detached-sig-create.sh

COVERAGE_INFO = baseline.info \
test_bitcoin_filtered.info total_coverage.info \
test_safecash_filtered.info total_coverage.info \
baseline_filtered.info functional_test.info functional_test_filtered.info \
test_bitcoin_coverage.info test_bitcoin.info
test_safecash_coverage.info test_safecash.info

dist-hook:
-$(GIT) archive --format=tar HEAD -- src/clientversion.cpp | $(AMTAR) -C $(top_distdir) -xf -

$(BITCOIN_WIN_INSTALLER): all-recursive
$(SAFECASH_WIN_INSTALLER): all-recursive
$(MKDIR_P) $(top_builddir)/release
STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIND_BIN) $(top_builddir)/release
STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_QT_BIN) $(top_builddir)/release
STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_CLI_BIN) $(top_builddir)/release
STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(SAFECASHD_BIN) $(top_builddir)/release
STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(SAFECASH_QT_BIN) $(top_builddir)/release
STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(SAFECASH_CLI_BIN) $(top_builddir)/release
@test -f $(MAKENSIS) && $(MAKENSIS) -V2 $(top_builddir)/share/setup.nsi || \
echo error: could not build $@
@echo built $@
Expand All @@ -91,11 +91,11 @@ $(OSX_APP)/Contents/Info.plist: $(OSX_PLIST)
$(MKDIR_P) $(@D)
$(INSTALL_DATA) $< $@

$(OSX_APP)/Contents/Resources/bitcoin.icns: $(OSX_INSTALLER_ICONS)
$(OSX_APP)/Contents/Resources/safecash.icns: $(OSX_INSTALLER_ICONS)
$(MKDIR_P) $(@D)
$(INSTALL_DATA) $< $@

$(OSX_APP)/Contents/MacOS/SafeCash-Qt: $(BITCOIN_QT_BIN)
$(OSX_APP)/Contents/MacOS/SafeCash-Qt: $(SAFECASH_QT_BIN)
$(MKDIR_P) $(@D)
STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $< $@

Expand All @@ -104,7 +104,7 @@ $(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings:
echo '{ CFBundleDisplayName = "$(PACKAGE_NAME)"; CFBundleName = "$(PACKAGE_NAME)"; }' > $@

OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lproj \
$(OSX_APP)/Contents/Resources/bitcoin.icns $(OSX_APP)/Contents/Info.plist \
$(OSX_APP)/Contents/Resources/safecash.icns $(OSX_APP)/Contents/Info.plist \
$(OSX_APP)/Contents/MacOS/SafeCash-Qt $(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings

osx_volname:
Expand Down Expand Up @@ -156,16 +156,16 @@ appbundle: $(OSX_APP_BUILT)
deploy: $(OSX_DMG)
endif
if TARGET_WINDOWS
deploy: $(BITCOIN_WIN_INSTALLER)
deploy: $(SAFECASH_WIN_INSTALLER)
endif

$(BITCOIN_QT_BIN): FORCE
$(SAFECASH_QT_BIN): FORCE
$(MAKE) -C src qt/$(@F)

$(BITCOIND_BIN): FORCE
$(SAFECASHD_BIN): FORCE
$(MAKE) -C src $(@F)

$(BITCOIN_CLI_BIN): FORCE
$(SAFECASH_CLI_BIN): FORCE
$(MAKE) -C src $(@F)

if USE_LCOV
Expand All @@ -178,16 +178,16 @@ baseline_filtered.info: baseline.info
$(abs_builddir)/contrib/filter-lcov.py $(LCOV_FILTER_PATTERN) $< $@
$(LCOV) -a $@ $(LCOV_OPTS) -o $@

test_bitcoin.info: baseline_filtered.info
test_safecash.info: baseline_filtered.info
$(MAKE) -C src/ check
$(LCOV) -c $(LCOV_OPTS) -d $(abs_builddir)/src -t test_bitcoin -o $@
$(LCOV) -c $(LCOV_OPTS) -d $(abs_builddir)/src -t test_safecash -o $@
$(LCOV) -z $(LCOV_OPTS) -d $(abs_builddir)/src

test_bitcoin_filtered.info: test_bitcoin.info
test_safecash_filtered.info: test_safecash.info
$(abs_builddir)/contrib/filter-lcov.py $(LCOV_FILTER_PATTERN) $< $@
$(LCOV) -a $@ $(LCOV_OPTS) -o $@

functional_test.info: test_bitcoin_filtered.info
functional_test.info: test_safecash_filtered.info
-@TIMEOUT=15 test/functional/test_runner.py $(EXTENDED_FUNCTIONAL_TESTS)
$(LCOV) -c $(LCOV_OPTS) -d $(abs_builddir)/src --t functional-tests -o $@
$(LCOV) -z $(LCOV_OPTS) -d $(abs_builddir)/src
Expand All @@ -196,21 +196,21 @@ functional_test_filtered.info: functional_test.info
$(abs_builddir)/contrib/filter-lcov.py $(LCOV_FILTER_PATTERN) $< $@
$(LCOV) -a $@ $(LCOV_OPTS) -o $@

test_bitcoin_coverage.info: baseline_filtered.info test_bitcoin_filtered.info
$(LCOV) -a $(LCOV_OPTS) baseline_filtered.info -a test_bitcoin_filtered.info -o $@
test_safecash_coverage.info: baseline_filtered.info test_safecash_filtered.info
$(LCOV) -a $(LCOV_OPTS) baseline_filtered.info -a test_safecash_filtered.info -o $@

total_coverage.info: test_bitcoin_filtered.info functional_test_filtered.info
$(LCOV) -a $(LCOV_OPTS) baseline_filtered.info -a test_bitcoin_filtered.info -a functional_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
total_coverage.info: test_safecash_filtered.info functional_test_filtered.info
$(LCOV) -a $(LCOV_OPTS) baseline_filtered.info -a test_safecash_filtered.info -a functional_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt

test_bitcoin.coverage/.dirstamp: test_bitcoin_coverage.info
test_safecash.coverage/.dirstamp: test_safecash_coverage.info
$(GENHTML) -s $(LCOV_OPTS) $< -o $(@D)
@touch $@

total.coverage/.dirstamp: total_coverage.info
$(GENHTML) -s $(LCOV_OPTS) $< -o $(@D)
@touch $@

cov: test_bitcoin.coverage/.dirstamp total.coverage/.dirstamp
cov: test_safecash.coverage/.dirstamp total.coverage/.dirstamp

endif

Expand All @@ -219,8 +219,8 @@ dist_noinst_SCRIPTS = autogen.sh
EXTRA_DIST = $(DIST_SHARE) test/functional/test_runner.py test/functional $(DIST_CONTRIB) $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING) $(BIN_CHECKS)

EXTRA_DIST += \
test/util/bitcoin-util-test.py \
test/util/data/bitcoin-util-test.json \
test/util/safecash-util-test.py \
test/util/data/safecash-util-test.json \
test/util/data/blanktxv1.hex \
test/util/data/blanktxv1.json \
test/util/data/blanktxv2.hex \
Expand Down Expand Up @@ -271,12 +271,12 @@ EXTRA_DIST += \
test/util/data/txcreatesignv1.json \
test/util/data/txcreatesignv2.hex

CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER)
CLEANFILES = $(OSX_DMG) $(SAFECASH_WIN_INSTALLER)

.INTERMEDIATE: $(COVERAGE_INFO)

DISTCHECK_CONFIGURE_FLAGS = --enable-man

clean-local:
rm -rf coverage_percent.txt test_bitcoin.coverage/ total.coverage/ test/tmp/ cache/ $(OSX_APP)
rm -rf coverage_percent.txt test_safecash.coverage/ total.coverage/ test/tmp/ cache/ $(OSX_APP)
rm -rf test/functional/__pycache__ test/functional/test_framework/__pycache__ test/cache
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dnl Copyright (c) 2013-2015 The Bitcoin Core developers
dnl Distributed under the MIT software license, see the accompanying
dnl file COPYING or http://www.opensource.org/licenses/mit-license.php.

AC_DEFUN([BITCOIN_FIND_BDB48],[
AC_DEFUN([SAFECASH_FIND_BDB48],[
AC_ARG_VAR(BDB_CFLAGS, [C compiler flags for BerkeleyDB, bypasses autodetection])
AC_ARG_VAR(BDB_LIBS, [Linker flags for BerkeleyDB, bypasses autodetection])
Expand Down Expand Up @@ -47,14 +47,14 @@ AC_DEFUN([BITCOIN_FIND_BDB48],[
AC_MSG_RESULT([no])
AC_MSG_ERROR([libdb_cxx headers missing, ]AC_PACKAGE_NAME[ requires this library for wallet functionality (--disable-wallet to disable wallet functionality)])
elif test "x$bdb48path" = "xX"; then
BITCOIN_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdbpath}],db_cxx)
SAFECASH_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdbpath}],db_cxx)
AC_ARG_WITH([incompatible-bdb],[AS_HELP_STRING([--with-incompatible-bdb], [allow using a bdb version other than 4.8])],[
AC_MSG_WARN([Found Berkeley DB other than 4.8; wallets opened by this build will not be portable!])
],[
AC_MSG_ERROR([Found Berkeley DB other than 4.8, required for portable wallets (--with-incompatible-bdb to ignore or --disable-wallet to disable wallet functionality)])
])
else
BITCOIN_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdb48path}],db_cxx)
SAFECASH_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdb48path}],db_cxx)
bdbpath="${bdb48path}"
fi
else
Expand Down

0 comments on commit 8ef8754

Please sign in to comment.