Permalink
Browse files

fixed some issues

  • Loading branch information...
ander7agar committed Dec 12, 2017
1 parent 0f8ad30 commit 07316b60623d99647fc53d1c34548dd3d03be833
@@ -4,10 +4,10 @@ TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)}
SRCDIR=${SRCDIR:-$TOPDIR/src}
MANDIR=${MANDIR:-$TOPDIR/doc/man}
BITCOIND=${BITCOIND:-$SRCDIR/litecoind}
BITCOINCLI=${BITCOINCLI:-$SRCDIR/litecoin-cli}
BITCOINTX=${BITCOINTX:-$SRCDIR/litecoin-tx}
BITCOINQT=${BITCOINQT:-$SRCDIR/qt/litecoin-qt}
BITCOIND=${BITCOIND:-$SRCDIR/creativecoind}
BITCOINCLI=${BITCOINCLI:-$SRCDIR/creativecoin-cli}
BITCOINTX=${BITCOINTX:-$SRCDIR/creativecoin-tx}
BITCOINQT=${BITCOINQT:-$SRCDIR/qt/creativecoin-qt}
[ ! -x $BITCOIND ] && echo "$LITECOIND not found or not executable." && exit 1
@@ -1,5 +1,5 @@
# Linearize
Construct a linear, no-fork, best version of the Litecoin blockchain. The scripts
Construct a linear, no-fork, best version of the Creativecoin blockchain. The scripts
run using Python 3 but are compatible with Python 2.
## Step 1: Download hash list
@@ -120,7 +120,7 @@ def main():
g.write('#ifndef BITCOIN_CHAINPARAMSSEEDS_H\n')
g.write('#define BITCOIN_CHAINPARAMSSEEDS_H\n')
g.write('/**\n')
g.write(' * List of fixed seed nodes for the litecoin network\n')
g.write(' * List of fixed seed nodes for the creativecoin network\n')
g.write(' * AUTOGENERATED by contrib/seeds/generate-seeds.py\n')
g.write(' *\n')
g.write(' * Each line contains a 16-byte IPv6 address and a port.\n')
@@ -31,7 +31,7 @@
PATTERN_IPV4 = re.compile(r"^((\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})):(\d+)$")
PATTERN_IPV6 = re.compile(r"^\[([0-9a-z:]+)\]:(\d+)$")
PATTERN_ONION = re.compile(r"^([abcdefghijklmnopqrstuvwxyz234567]{16}\.onion):(\d+)$")
PATTERN_AGENT = re.compile(r"^(/Satoshi:0.12.(0|1|99)/|/Satoshi:0.13.(0|1|2|99)/|/LitecoinCore:0.13.(0|1|2|99)/)$")
PATTERN_AGENT = re.compile(r"^(/Satoshi:0.12.(0|1|99)/|/Satoshi:0.13.(0|1|2|99)/|/CreativecoinCore:0.13.(0|1|2|99)/)$")
def parseline(line):
sline = line.split()
@@ -36,15 +36,15 @@ def check_json_precision():
raise RuntimeError("JSON encode/decode loses precision")
def determine_db_dir():
"""Return the default location of the litecoin data directory"""
"""Return the default location of the creativecoin data directory"""
if platform.system() == "Darwin":
return os.path.expanduser("~/Library/Application Support/Litecoin/")
return os.path.expanduser("~/Library/Application Support/Creativecoin/")
elif platform.system() == "Windows":
return os.path.join(os.environ['APPDATA'], "Litecoin")
return os.path.expanduser("~/.litecoin")
return os.path.join(os.environ['APPDATA'], "Creativecoin")
return os.path.expanduser("~/.creativecoin")
def read_bitcoin_config(dbdir):
"""Read the litecoin.conf file from dbdir, returns dictionary of settings"""
"""Read the creativecoin.conf file from dbdir, returns dictionary of settings"""
from ConfigParser import SafeConfigParser
class FakeSecHead(object):
@@ -62,11 +62,11 @@ def readline(self):
return s
config_parser = SafeConfigParser()
config_parser.readfp(FakeSecHead(open(os.path.join(dbdir, "litecoin.conf"))))
config_parser.readfp(FakeSecHead(open(os.path.join(dbdir, "creativecoin.conf"))))
return dict(config_parser.items("all"))
def connect_JSON(config):
"""Connect to a litecoin JSON-RPC server"""
"""Connect to a creativecoin JSON-RPC server"""
testnet = config.get('testnet', '0')
testnet = (int(testnet) > 0) # 0/1 in config file, convert to True/False
if not 'rpcport' in config:
@@ -224,15 +224,15 @@ def main():
parser = optparse.OptionParser(usage="%prog [options]")
parser.add_option("--from", dest="fromaddresses", default=None,
help="addresses to get litecoins from")
help="addresses to get creativecoins from")
parser.add_option("--to", dest="to", default=None,
help="address to get send litecoins to")
help="address to get send creativecoins to")
parser.add_option("--amount", dest="amount", default=None,
help="amount to send")
parser.add_option("--fee", dest="fee", default="0.0",
help="fee to include")
parser.add_option("--datadir", dest="datadir", default=determine_db_dir(),
help="location of litecoin.conf file with RPC username/password (default: %default)")
help="location of creativecoin.conf file with RPC username/password (default: %default)")
parser.add_option("--testnet", dest="testnet", default=False, action="store_true",
help="Use the test network")
parser.add_option("--dry_run", dest="dry_run", default=False, action="store_true",
@@ -7,7 +7,7 @@ if [ -d "$1" ]; then
cd "$1"
else
echo "Usage: $0 <datadir>" >&2
echo "Removes obsolete Litecoin database files" >&2
echo "Removes obsolete Creativecoin database files" >&2
exit 1
fi
@@ -19,22 +19,22 @@ if [ -f wallet.dat -a -f peers.dat -a -f chainstate/CURRENT -a -f blocks/index/C
case $LEVEL in
0)
echo "Error: no Litecoin datadir detected."
echo "Error: no Creativecoin datadir detected."
exit 1
;;
1)
echo "Detected old Litecoin datadir (before 0.7)."
echo "Detected old Creativecoin datadir (before 0.7)."
echo "Nothing to do."
exit 0
;;
2)
echo "Detected Litecoin 0.7 datadir."
echo "Detected Creativecoin 0.7 datadir."
;;
3)
echo "Detected Litecoin pre-0.8 datadir."
echo "Detected Creativecoin pre-0.8 datadir."
;;
4)
echo "Detected Litecoin 0.8 datadir."
echo "Detected Creativecoin 0.8 datadir."
;;
esac
@@ -12,9 +12,9 @@ For example:
make HOST=x86_64-w64-mingw32 -j4
A prefix will be generated that's suitable for plugging into Litecoin's
A prefix will be generated that's suitable for plugging into Creativecoin's
configure. In the above example, a dir named x86_64-w64-mingw32 will be
created. To use it for Litecoin:
created. To use it for Creativecoin:
./configure --prefix=`pwd`/depends/x86_64-w64-mingw32
@@ -43,7 +43,7 @@ The following can be set when running make: make FOO=bar
BUILD_ID_SALT: Optional salt to use when generating build package ids
If some packages are not built, for example `make NO_WALLET=1`, the appropriate
options will be passed to litecoin's configure. In this case, `--disable-wallet`.
options will be passed to creativecoin's configure. In this case, `--disable-wallet`.
Additional targets:
@@ -1 +1 @@
The list of assets used in the litecoin source and their attribution can now be found in [contrib/debian/copyright](../contrib/debian/copyright).
The list of assets used in the creativecoin source and their attribution can now be found in [contrib/debian/copyright](../contrib/debian/copyright).
@@ -2,11 +2,11 @@ Benchmarking
============
Litecoin Core has an internal benchmarking framework, with benchmarks
Creativecoin Core has an internal benchmarking framework, with benchmarks
for cryptographic algorithms such as SHA1, SHA256, SHA512 and RIPEMD160. As well as the rolling bloom filter.
After compiling litecoin-core, the benchmarks can be run with:
`src/bench/bench_litecoin`
After compiling creativecoin-core, the benchmarks can be run with:
`src/bench/bench_creativecoin`
The output will look similar to:
```
@@ -1,7 +1,7 @@
Fuzz-testing Litecoin Core
Fuzz-testing Creativecoin Core
==========================
A special test harness `test_litecoin_fuzzy` is provided to provide an easy
A special test harness `test_creativecoin_fuzzy` is provided to provide an easy
entry point for fuzzers and the like. In this document we'll describe how to
use it with AFL.
@@ -20,13 +20,13 @@ export AFLPATH=$PWD
Instrumentation
----------------
To build Litecoin Core using AFL instrumentation (this assumes that the
To build Creativecoin Core using AFL instrumentation (this assumes that the
`AFLPATH` was set as above):
```
./configure --disable-ccache --disable-shared --enable-tests CC=${AFLPATH}/afl-gcc CXX=${AFLPATH}/afl-g++
export AFL_HARDEN=1
cd src/
make test/test_litecoin_fuzzy
make test/test_creativecoin_fuzzy
```
We disable ccache because we don't want to pollute the ccache with instrumented
objects, and similarly don't want to use non-instrumented cached objects linked
@@ -58,7 +58,7 @@ Fuzzing
To start the actual fuzzing use:
```
$AFLPATH/afl-fuzz -i ${AFLIN} -o ${AFLOUT} -m52 -- test/test_litecoin_fuzzy
$AFLPATH/afl-fuzz -i ${AFLIN} -o ${AFLOUT} -m52 -- test/test_creativecoin_fuzzy
```
You may have to change a few kernel parameters to test optimally - `afl-fuzz`
Oops, something went wrong.

0 comments on commit 07316b6

Please sign in to comment.