diff --git a/.travis.yml b/.travis.yml index 662ac5681..250756396 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,73 +1,23 @@ -# errata: -# - A travis bug causes caches to trample eachother when using the same -# compiler key (which we don't use anyway). This is worked around for now by -# replacing the "compilers" with a build name prefixed by the no-op ":" -# command. See: https://github.com/travis-ci/casher/issues/6 - -os: linux language: cpp -compiler: gcc -env: - global: - - MAKEJOBS=-j3 - - RUN_TESTS=false - - BOOST_TEST_RANDOM=1$TRAVIS_BUILD_ID - - CCACHE_SIZE=100M - - CCACHE_TEMPDIR=/tmp/.ccache-temp - - CCACHE_COMPRESS=1 - - BASE_OUTDIR=$TRAVIS_BUILD_DIR/out - - SDK_URL=https://bitcoincore.org/depends-sources/sdks - - PYTHON_DEBUG=1 - - WINEDEBUG=fixme-all -cache: - apt: true - directories: - - depends/built - - depends/sdk-sources - - $HOME/.ccache -matrix: - fast_finish: true - include: - - compiler: ": ARM" - env: HOST=arm-linux-gnueabihf PACKAGES="g++-arm-linux-gnueabihf" DEP_OPTS="NO_QT=1" GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports" - - compiler: ": Win32" - env: HOST=i686-w64-mingw32 PACKAGES="nsis gcc-mingw-w64-i686 g++-mingw-w64-i686 binutils-mingw-w64-i686 mingw-w64-dev wine bc" RUN_TESTS=true GOAL="deploy" BITCOIN_CONFIG="--enable-reduce-exports" MAKEJOBS="-j2" - - compiler: ": 32-bit + dash" - env: HOST=i686-pc-linux-gnu PACKAGES="g++-multilib bc python-zmq" PPA="ppa:chris-lea/zeromq" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-zmq --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++" USE_SHELL="/bin/dash" - - compiler: ": Win64" - env: HOST=x86_64-w64-mingw32 PACKAGES="nsis gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 binutils-mingw-w64-x86-64 mingw-w64-dev wine bc" RUN_TESTS=true GOAL="deploy" BITCOIN_CONFIG="--enable-reduce-exports" MAKEJOBS="-j2" - - compiler: ": bitcoind" - env: HOST=x86_64-unknown-linux-gnu PACKAGES="bc python-zmq" PPA="ppa:chris-lea/zeromq" DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-zmq --enable-glibc-back-compat --enable-reduce-exports CPPFLAGS=-DDEBUG_LOCKORDER" - - compiler: ": No wallet" - env: HOST=x86_64-unknown-linux-gnu DEP_OPTS="NO_WALLET=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports" - - compiler: ": Cross-Mac" - env: HOST=x86_64-apple-darwin11 PACKAGES="cmake libcap-dev libz-dev libbz2-dev" BITCOIN_CONFIG="--enable-reduce-exports" OSX_SDK=10.9 GOAL="deploy" - exclude: - - compiler: gcc -install: - - if [ -n "$PACKAGES" ]; then sudo rm -f /etc/apt/sources.list.d/travis_ci_zeromq3-source.list; fi - - if [ -n "$PACKAGES" ]; then travis_retry sudo apt-get update; fi - - if [ -n "$PACKAGES" ]; then travis_retry sudo apt-get install --no-install-recommends --no-upgrade -qq $PACKAGES; fi -before_script: - - unset CC; unset CXX - - mkdir -p depends/SDKs depends/sdk-sources - - if [ -n "$OSX_SDK" -a ! -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then wget $SDK_URL/MacOSX${OSX_SDK}.sdk.tar.gz -O depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz; fi - - if [ -n "$OSX_SDK" -a -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then tar -C depends/SDKs -xf depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz; fi - - make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS -script: - - if [ -n "$USE_SHELL" ]; then export CONFIG_SHELL="$USE_SHELL"; fi - - OUTDIR=$BASE_OUTDIR/$TRAVIS_PULL_REQUEST/$TRAVIS_JOB_NUMBER-$HOST - - BITCOIN_CONFIG_ALL="--disable-dependency-tracking --prefix=$TRAVIS_BUILD_DIR/depends/$HOST --bindir=$OUTDIR/bin --libdir=$OUTDIR/lib" - - depends/$HOST/native/bin/ccache --max-size=$CCACHE_SIZE - - if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then export CCACHE_READONLY=1; fi - - test -n "$USE_SHELL" && eval '"$USE_SHELL" -c "./autogen.sh"' || ./autogen.sh - - ./configure --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false) - - make distdir PACKAGE=bitcoin VERSION=$HOST - - cd bitcoin-$HOST - - ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false) - - make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && make $GOAL V=1 ; false ) - - export LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib - - if [ "$RUN_TESTS" = "true" ]; then make check; fi - - if [ "$RUN_TESTS" = "true" ]; then qa/pull-tester/rpc-tests.sh; fi -after_script: - - if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then (echo "Upload goes here. Something like: scp -r $BASE_OUTDIR server" || echo "upload failed"); fi + +compiler: + - gcc + +before_install: + - sudo add-apt-repository --yes ppa:ubuntu-sdk-team/ppa + - sudo apt-get update -qq + - sudo apt-get install build-essential pkg-config libcurl3-gnutls-dev libc6-dev libevent-dev m4 g++-multilib autoconf libtool ncurses-dev unzip git python zlib1g-dev wget bsdmainutils automake libssl-dev libprotobuf-dev protobuf-compiler libdb++-dev ntp ntpdate +#install: + +script: + - ./zcutil/build.sh -j 5 + +notifications: + irc: + channels: + - "chat.freenode.net#komodoplatform" + template: + - "%{repository}/%{branch} (%{commit} - %{author}): %{message}" + - "Alt Message : %{repository_slug} - (%{commit} - %{author}): %{message}, Build Time: %{duration}" + - "Change view : %{compare_url}" + - "Build details : %{build_url}" diff --git a/README.md b/README.md index 6c927185c..65f34d3d4 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ It downloads and stores the entire history of Komodo transactions; depending on - Komodo Platform public material: [Komodo Platform public material](https://docs.google.com/document/d/1AbhWrtagu4vYdkl-vsWz-HSNyNvK-W-ZasHCqe7CZy0) ## List of Komodo Platform Technologies Delayed Proof of Work (dPoW) - Additional security layer. -zk-SNARKs - Komodo Platform�s privacy technology +zk-SNARKs - Komodo Platform's privacy technology Jumblr - Decentralized tumbler for KMD and other cryptocurrencies Assetchains - Easy way to fork Komodo coin Pegged Assets - Chains that maintain a peg to fiat currencies @@ -26,15 +26,14 @@ Block Time: 1M 2s Block Reward: 3KMD Mining Algorithm: Equihash ## About this Project -Komodo has being evolved from Zcash project, where we used some of their codebase and extended it with new technologies. -Same Zcash is based on Bitcoin's code, with differnece Zcash intends to offer a far higher standard of privacy through a sophisticated zero-knowledge proving scheme that preserves confidentiality of transaction metadata. Technical details are available in our [Protocol Specification](https://github.com/zcash/zips/raw/master/protocol/protocol.pdf). +Komodo is based on Zcash and has been by our innovative consensus algorithm called dPoW which utilizes Bitcoin's hashrate to store Komodo blockchain information into the Bitcoin blockchain. Other new and native Komodo features are the privacy technology called JUMBLR or our assetchain capabilities (one click plug and play blockchain solutions). More details are available under https://komodoplatform.com/. ## Getting started Dependencies ------------ ``` #The following packages are needed: -sudo apt-get install build-essential pkg-config libcurl3-gnutls-dev libc6-dev libevent-dev m4 g++-multilib autoconf libtool ncurses-dev unzip git python zlib1g-dev wget bsdmainutils automake libboost-all-dev libssl-dev libprotobuf-dev protobuf-compiler libqt4-dev libqrencode-dev libdb++-dev ntp ntpdate +sudo apt-get install build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool ncurses-dev unzip git python python-zmq zlib1g-dev wget libcurl3-gnutls-dev bsdmainutils automake ``` Komodo diff --git a/src/assetchains b/src/assetchains index 6b80a62ea..1ca93b3c2 100755 --- a/src/assetchains +++ b/src/assetchains @@ -1,7 +1,7 @@ #!/bin/bash source pubkey.txt args=("$@") -seed_ip='78.47.196.146' +seed_ip=`getent hosts seed.mewhub.com | awk '{ print $1 }'` komodo_binary='./komodod' delay=20 @@ -35,7 +35,7 @@ komodo_asset JUMBLR 999999 komodo_asset BET 999999 komodo_asset CRYPTO 999999 komodo_asset HODL 9999999 -komodo_asset SHARK 1401 +#komodo_asset SHARK 1401 komodo_asset MSHARK 1400000 komodo_asset BOTS 999999 komodo_asset MGW 999999 @@ -46,36 +46,40 @@ komodo_asset KV 1000000 komodo_asset CEAL 366666666 komodo_asset MESH 1000007 komodo_asset MNZ 257142858 +komodo_asset AXO 200000000 +komodo_asset ETOMIC 100000000 +komodo_asset BTCH 20998641 +komodo_asset VOTE 49999999999 -komodo_asset USD -komodo_asset EUR -komodo_asset JPY -komodo_asset GBP -komodo_asset AUD -komodo_asset CAD -komodo_asset CHF -komodo_asset NZD -komodo_asset CNY -komodo_asset RUB -komodo_asset MXN -komodo_asset BRL -komodo_asset INR -komodo_asset HKD -komodo_asset TRY -komodo_asset ZAR -komodo_asset PLN -komodo_asset NOK -komodo_asset SEK -komodo_asset DKK -komodo_asset CZK -komodo_asset HUF -komodo_asset ILS -komodo_asset KRW -komodo_asset MYR -komodo_asset PHP -komodo_asset RON -komodo_asset SGD -komodo_asset THB -komodo_asset BGN -komodo_asset IDR -komodo_asset HRK +#komodo_asset USD +#komodo_asset EUR +#komodo_asset JPY +#komodo_asset GBP +#komodo_asset AUD +#komodo_asset CAD +#komodo_asset CHF +#komodo_asset NZD +#komodo_asset CNY +#komodo_asset RUB +#komodo_asset MXN +#komodo_asset BRL +#komodo_asset INR +#komodo_asset HKD +#komodo_asset TRY +#komodo_asset ZAR +#komodo_asset PLN +#komodo_asset NOK +#komodo_asset SEK +#komodo_asset DKK +#komodo_asset CZK +#komodo_asset HUF +#komodo_asset ILS +#komodo_asset KRW +#komodo_asset MYR +#komodo_asset PHP +#komodo_asset RON +#komodo_asset SGD +#komodo_asset THB +#komodo_asset BGN +#komodo_asset IDR +#komodo_asset HRK diff --git a/src/assetchains.old b/src/assetchains.old index 601eda111..20f47d006 100755 --- a/src/assetchains.old +++ b/src/assetchains.old @@ -12,79 +12,83 @@ echo $pubkey ./komodod -pubkey=$pubkey -ac_name=BET -ac_supply=999999 -addnode=78.47.196.146 $1 & ./komodod -pubkey=$pubkey -ac_name=CRYPTO -ac_supply=999999 -addnode=78.47.196.146 $1 & ./komodod -pubkey=$pubkey -ac_name=HODL -ac_supply=9999999 -addnode=78.47.196.146 $1 & -./komodod -pubkey=$pubkey -ac_name=SHARK -ac_supply=1401 -addnode=78.47.196.146 $1 & ./komodod -pubkey=$pubkey -ac_name=MSHARK -ac_supply=1400000 -addnode=78.47.196.146 $1 & ./komodod -pubkey=$pubkey -ac_name=BOTS -ac_supply=999999 -addnode=78.47.196.146 $1 & ./komodod -pubkey=$pubkey -ac_name=MGW -ac_supply=999999 -addnode=78.47.196.146 $1 & -#./komodod -pubkey=$pubkey -ac_name=MVP -ac_supply=1000000 -addnode=78.47.196.146 $1 & ./komodod -pubkey=$pubkey -ac_name=COQUI -ac_supply=72000000 -addnode=78.47.196.146 $1 & ./komodod -pubkey=$pubkey -ac_name=WLC -ac_supply=210000000 -addnode=148.251.190.89 $1 & ./komodod -pubkey=$pubkey -ac_name=KV -ac_supply=1000000 -addnode=78.47.196.146 $1 & ./komodod -pubkey=$pubkey -ac_name=CEAL -ac_supply=366666666 -addnode=78.47.196.146 $1 & ./komodod -pubkey=$pubkey -ac_name=MESH -ac_supply=1000007 -addnode=78.47.196.146 $1 & ./komodod -pubkey=$pubkey -ac_name=MNZ -ac_supply=257142858 -addnode=51.15.138.138 $1 & -sleep $delay +./komodod -pubkey=$pubkey -ac_name=AXO -ac_supply=200000000 -addnode=78.47.196.146 & +./komodod -pubkey=$pubkey -ac_name=ETOMIC -ac_supply=100000000 -addnode=78.47.196.146 & +./komodod -pubkey=$pubkey -ac_name=BTCH -ac_supply=20998641 -addnode=78.47.196.146 & +./komodod -pubkey=$pubkey -ac_name=VOTE -ac_supply=49999999999 -addnode=78.47.196.146 & +./komodod -pubkey=$pubkey -ac_name=BEER -ac_supply=100000000 -addnode=24.54.206.138 & +./komodod -pubkey=$pubkey -ac_name=PIZZA -ac_supply=100000000 -addnode=24.54.206.138 & +#sleep $delay -./komodod -pubkey=$pubkey -ac_name=USD -addnode=78.47.196.146 $1 & -sleep $delay -./komodod -pubkey=$pubkey -ac_name=EUR -addnode=78.47.196.146 $1 & -sleep $delay -./komodod -pubkey=$pubkey -ac_name=JPY -addnode=78.47.196.146 $1 & -sleep $delay -./komodod -pubkey=$pubkey -ac_name=GBP -addnode=78.47.196.146 $1 & -sleep $delay -./komodod -pubkey=$pubkey -ac_name=AUD -addnode=78.47.196.146 $1 & -sleep $delay -./komodod -pubkey=$pubkey -ac_name=CAD -addnode=78.47.196.146 $1 & -sleep $delay -./komodod -pubkey=$pubkey -ac_name=CHF -addnode=78.47.196.146 $1 & -sleep $delay -./komodod -pubkey=$pubkey -ac_name=NZD -addnode=78.47.196.146 $1 & -sleep $delay -./komodod -pubkey=$pubkey -ac_name=CNY -addnode=78.47.196.146 $1 & -sleep $delay -./komodod -pubkey=$pubkey -ac_name=RUB -addnode=78.47.196.146 $1 & -sleep $delay -./komodod -pubkey=$pubkey -ac_name=MXN -addnode=78.47.196.146 $1 & -sleep $delay -./komodod -pubkey=$pubkey -ac_name=BRL -addnode=78.47.196.146 $1 & -sleep $delay -./komodod -pubkey=$pubkey -ac_name=INR -addnode=78.47.196.146 $1 & -sleep $delay -./komodod -pubkey=$pubkey -ac_name=HKD -addnode=78.47.196.146 $1 & -sleep $delay -./komodod -pubkey=$pubkey -ac_name=TRY -addnode=78.47.196.146 $1 & -sleep $delay -./komodod -pubkey=$pubkey -ac_name=ZAR -addnode=78.47.196.146 $1 & -sleep $delay -./komodod -pubkey=$pubkey -ac_name=PLN -addnode=78.47.196.146 $1 & -sleep $delay -./komodod -pubkey=$pubkey -ac_name=NOK -addnode=78.47.196.146 $1 & -sleep $delay -./komodod -pubkey=$pubkey -ac_name=SEK -addnode=78.47.196.146 $1 & -sleep $delay -./komodod -pubkey=$pubkey -ac_name=DKK -addnode=78.47.196.146 $1 & -sleep $delay -./komodod -pubkey=$pubkey -ac_name=CZK -addnode=78.47.196.146 $1 & -sleep $delay -./komodod -pubkey=$pubkey -ac_name=HUF -addnode=78.47.196.146 $1 & -sleep $delay -./komodod -pubkey=$pubkey -ac_name=ILS -addnode=78.47.196.146 $1 & -sleep $delay -./komodod -pubkey=$pubkey -ac_name=KRW -addnode=78.47.196.146 $1 & -sleep $delay -./komodod -pubkey=$pubkey -ac_name=MYR -addnode=78.47.196.146 $1 & -sleep $delay -./komodod -pubkey=$pubkey -ac_name=PHP -addnode=78.47.196.146 $1 & -sleep $delay -./komodod -pubkey=$pubkey -ac_name=RON -addnode=78.47.196.146 $1 & -sleep $delay -./komodod -pubkey=$pubkey -ac_name=SGD -addnode=78.47.196.146 $1 & -sleep $delay -./komodod -pubkey=$pubkey -ac_name=THB -addnode=78.47.196.146 $1 & -sleep $delay -./komodod -pubkey=$pubkey -ac_name=BGN -addnode=78.47.196.146 $1 & -sleep $delay -./komodod -pubkey=$pubkey -ac_name=IDR -addnode=78.47.196.146 $1 & -sleep $delay -./komodod -pubkey=$pubkey -ac_name=HRK -addnode=78.47.196.146 $1 & +#./komodod -pubkey=$pubkey -ac_name=USD -addnode=78.47.196.146 $1 & +#sleep $delay +#./komodod -pubkey=$pubkey -ac_name=EUR -addnode=78.47.196.146 $1 & +#sleep $delay +#./komodod -pubkey=$pubkey -ac_name=JPY -addnode=78.47.196.146 $1 & +#sleep $delay +#./komodod -pubkey=$pubkey -ac_name=GBP -addnode=78.47.196.146 $1 & +#sleep $delay +#./komodod -pubkey=$pubkey -ac_name=AUD -addnode=78.47.196.146 $1 & +#sleep $delay +#./komodod -pubkey=$pubkey -ac_name=CAD -addnode=78.47.196.146 $1 & +#sleep $delay +#./komodod -pubkey=$pubkey -ac_name=CHF -addnode=78.47.196.146 $1 & +#sleep $delay +#./komodod -pubkey=$pubkey -ac_name=NZD -addnode=78.47.196.146 $1 & +#sleep $delay +#./komodod -pubkey=$pubkey -ac_name=CNY -addnode=78.47.196.146 $1 & +#sleep $delay +#./komodod -pubkey=$pubkey -ac_name=RUB -addnode=78.47.196.146 $1 & +#sleep $delay +#./komodod -pubkey=$pubkey -ac_name=MXN -addnode=78.47.196.146 $1 & +#sleep $delay +#./komodod -pubkey=$pubkey -ac_name=BRL -addnode=78.47.196.146 $1 & +#sleep $delay +#./komodod -pubkey=$pubkey -ac_name=INR -addnode=78.47.196.146 $1 & +#sleep $delay +#./komodod -pubkey=$pubkey -ac_name=HKD -addnode=78.47.196.146 $1 & +#sleep $delay +#./komodod -pubkey=$pubkey -ac_name=TRY -addnode=78.47.196.146 $1 & +#sleep $delay +#./komodod -pubkey=$pubkey -ac_name=ZAR -addnode=78.47.196.146 $1 & +#sleep $delay +#./komodod -pubkey=$pubkey -ac_name=PLN -addnode=78.47.196.146 $1 & +#sleep $delay +#./komodod -pubkey=$pubkey -ac_name=NOK -addnode=78.47.196.146 $1 & +#sleep $delay +#./komodod -pubkey=$pubkey -ac_name=SEK -addnode=78.47.196.146 $1 & +#sleep $delay +#./komodod -pubkey=$pubkey -ac_name=DKK -addnode=78.47.196.146 $1 & +#sleep $delay +#./komodod -pubkey=$pubkey -ac_name=CZK -addnode=78.47.196.146 $1 & +#sleep $delay +#./komodod -pubkey=$pubkey -ac_name=HUF -addnode=78.47.196.146 $1 & +#sleep $delay +#./komodod -pubkey=$pubkey -ac_name=ILS -addnode=78.47.196.146 $1 & +#sleep $delay +#./komodod -pubkey=$pubkey -ac_name=KRW -addnode=78.47.196.146 $1 & +#sleep $delay +#./komodod -pubkey=$pubkey -ac_name=MYR -addnode=78.47.196.146 $1 & +#sleep $delay +#./komodod -pubkey=$pubkey -ac_name=PHP -addnode=78.47.196.146 $1 & +#sleep $delay +#./komodod -pubkey=$pubkey -ac_name=RON -addnode=78.47.196.146 $1 & +#sleep $delay +#./komodod -pubkey=$pubkey -ac_name=SGD -addnode=78.47.196.146 $1 & +#sleep $delay +#./komodod -pubkey=$pubkey -ac_name=THB -addnode=78.47.196.146 $1 & +#sleep $delay +#./komodod -pubkey=$pubkey -ac_name=BGN -addnode=78.47.196.146 $1 & +#sleep $delay +#./komodod -pubkey=$pubkey -ac_name=IDR -addnode=78.47.196.146 $1 & +#sleep $delay +#./komodod -pubkey=$pubkey -ac_name=HRK -addnode=78.47.196.146 $1 & diff --git a/src/assetfunds b/src/assetfunds deleted file mode 100755 index 6aede587c..000000000 --- a/src/assetfunds +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -set -x -./komodo-cli paxdeposit $1 0.01 aud -./komodo-cli paxdeposit $1 0.01 bgn -./komodo-cli paxdeposit $1 0.01 cad -./komodo-cli paxdeposit $1 0.01 chf -./komodo-cli paxdeposit $1 0.01 cny -./komodo-cli paxdeposit $1 0.01 czk -./komodo-cli paxdeposit $1 0.01 dkk -./komodo-cli paxdeposit $1 0.01 eur -./komodo-cli paxdeposit $1 0.01 gbp -./komodo-cli paxdeposit $1 0.01 hkd -./komodo-cli paxdeposit $1 0.01 hrk -./komodo-cli paxdeposit $1 0.01 huf -./komodo-cli paxdeposit $1 0.01 idr -./komodo-cli paxdeposit $1 0.01 ils -./komodo-cli paxdeposit $1 0.01 inr -./komodo-cli paxdeposit $1 0.01 jpy -./komodo-cli paxdeposit $1 0.01 krw -./komodo-cli paxdeposit $1 0.01 mxn -./komodo-cli paxdeposit $1 0.01 myr -./komodo-cli paxdeposit $1 0.01 nok -./komodo-cli paxdeposit $1 0.01 nzd -./komodo-cli paxdeposit $1 0.01 php -./komodo-cli paxdeposit $1 0.01 pln -./komodo-cli paxdeposit $1 0.01 brl -./komodo-cli paxdeposit $1 0.01 ron -./komodo-cli paxdeposit $1 0.01 rub -./komodo-cli paxdeposit $1 0.01 sek -./komodo-cli paxdeposit $1 0.01 sgd -./komodo-cli paxdeposit $1 0.01 thb -./komodo-cli paxdeposit $1 0.01 try -./komodo-cli paxdeposit $1 0.01 usd -./komodo-cli paxdeposit $1 0.01 zar diff --git a/src/chain.cpp b/src/chain.cpp index 5b8ce076c..9cd13d997 100644 --- a/src/chain.cpp +++ b/src/chain.cpp @@ -51,6 +51,8 @@ CBlockLocator CChain::GetLocator(const CBlockIndex *pindex) const { } const CBlockIndex *CChain::FindFork(const CBlockIndex *pindex) const { + if ( pindex == 0 ) + return(0); if (pindex->nHeight > Height()) pindex = pindex->GetAncestor(Height()); while (pindex && !Contains(pindex)) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 13409c8c4..d84278b31 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -118,6 +118,7 @@ public: fRequireStandard = true; fMineBlocksOnDemand = false; fTestnetToBeDeprecatedFieldRPC = false; +/* checkpointData = (Checkpoints::CCheckpointData) { boost::assign::map_list_of @@ -131,6 +132,17 @@ public: 2777 // * estimated number of transactions per day after checkpoint // total number of tx / (checkpoint block height / (24 * 24)) }; +*/ + +// LogPrintf(">>>>>>>> ac_name = %u\n",GetArg("-ac_name","").c_str()); + +// if ( GetArg("-ac_name","").c_str()[0] != 0 ) +// { +// } +// else +// { +// } + if ( pthread_create((pthread_t *)malloc(sizeof(pthread_t)),NULL,chainparams_commandline,(void *)&consensus) != 0 ) { @@ -139,8 +151,14 @@ public: }; static CMainParams mainParams; +void CChainParams::SetCheckpointData(Checkpoints::CCheckpointData checkpointData) +{ + CChainParams::checkpointData = checkpointData; +} + void *chainparams_commandline(void *ptr) { + Checkpoints::CCheckpointData checkpointData; while ( ASSETCHAINS_PORT == 0 ) { #ifdef _WIN32 @@ -158,7 +176,176 @@ void *chainparams_commandline(void *ptr) mainParams.pchMessageStart[2] = (ASSETCHAINS_MAGIC >> 16) & 0xff; mainParams.pchMessageStart[3] = (ASSETCHAINS_MAGIC >> 24) & 0xff; fprintf(stderr,">>>>>>>>>> %s: port.%u/%u magic.%08x %u %u coins\n",ASSETCHAINS_SYMBOL,ASSETCHAINS_PORT,ASSETCHAINS_PORT+1,ASSETCHAINS_MAGIC,ASSETCHAINS_MAGIC,(uint32_t)ASSETCHAINS_SUPPLY); + + checkpointData = //(Checkpoints::CCheckpointData) + { + boost::assign::map_list_of + (0, mainParams.consensus.hashGenesisBlock), + //(2500, uint256S("0x0e6a3d5a46eba97c4e7618d66a39f115729e1176433c98481124c2bf733aa54e")) + //(15000, uint256S("0x00f0bd236790e903321a2d22f85bd6bf8a505f6ef4eddb20458a65d37e14d142")), + //(100000, uint256S("0x0f02eb1f3a4b89df9909fec81a4bd7d023e32e24e1f5262d9fc2cc36a715be6f")), + (int64_t)1481120910, // * UNIX timestamp of last checkpoint block + (int64_t)110415, // * total number of transactions between genesis and last checkpoint + // (the tx=... number in the SetBestChain debug.log lines) + (double)2777 // * estimated number of transactions per day after checkpoint + // total number of tx / (checkpoint block height / (24 * 24)) + }; + } + else + { + checkpointData = //(Checkpoints::CCheckpointData) + { + boost::assign::map_list_of + + (0, mainParams.consensus.hashGenesisBlock) + ( 5000, uint256S("0x049cfc91eef411e96603a42c9a77c5e30e9fe96f783ab818f4c00fb56fb29b6c")) + ( 10000, uint256S("0x0a0169db3614311cd4181deb73cfcf7f640e7dc956cda34e0121a0351925e9ae")) + ( 15000, uint256S("0x00f0bd236790e903321a2d22f85bd6bf8a505f6ef4eddb20458a65d37e14d142")) + ( 20000, uint256S("0x01bbf0c38892bdcced62b538329cf63bc7badca3e7e1bff8eb10345436871c6e")) + ( 25000, uint256S("0x04ca27808268dda8f942b647a6df844be1b263a661a13740293db962022d1f9e")) + ( 30000, uint256S("0x04c9e8cfbcd37399085e529b50147de8afb80c76c48752c122d56f23316a7acb")) + ( 35000, uint256S("0x00815f1240354cff7487c67f7dff78e248cb9053ed2c92751d1a9ad42d3eaedf")) + ( 40000, uint256S("0x00eafd9dfb1e5f1bf1cca0c49be628538900daf69b665464443d29c2c3b6a2fe")) + ( 45000, uint256S("0x0377730632caf694b92f40d03ae0fbe5bd86a1205014b71d975453ac793b0af9")) + ( 50000, uint256S("0x00076e16d3fa5194da559c17cf9cf285e21d1f13154ae4f7c7b87919549345aa")) + ( 55000, uint256S("0x0005a0701a83e05b639418ea4c87018544a4d22b2b49e5f111161e8ffc455108")) + ( 60000, uint256S("0x0000296fc15f8599b7c6561d0e0a96f24766135ed79107b603d6dd6e55142c0d")) + ( 65000, uint256S("0x000861f5d7970d5399733b4605074d47f877d6536f74ffae6f08e871ee29e6f2")) + ( 70000, uint256S("0x0002af1d487c567526c517b52996944dca344e139cddca77c2e72f746e73b263")) + ( 75000, uint256S("0x0d08129659be5f105e70c047769359eaf3475d61a726750859fdca3e1a2bf5cc")) + ( 80000, uint256S("0x0af5f3f1caae4f08c74a82689731d1ef8e55107c06f9a996e251b8ecb96989ad")) + ( 85000, uint256S("0x00000c8ee29086c5fb39eddad0619773b9ce936c77c13e5e5118a4998e939544")) + ( 90000, uint256S("0x06d3bb7f9ee5b55f67b2dc13c680699a2f736f43a44b4e4cfd41a58aa00f063f")) + ( 95000, uint256S("0x0670981b269879aae83a88f6f0c4db34763c93fd410d96435f2acb4e6580b976")) + ( 100000, uint256S("0x0f02eb1f3a4b89df9909fec81a4bd7d023e32e24e1f5262d9fc2cc36a715be6f")) + ( 105000, uint256S("0x018b97d7e6d259add24afe0e08fc125dc21d734e8831b68b430f5c3896deb4af")) + ( 110000, uint256S("0x09644ff52734e0e911a9ba7ecd03cf7995b25301840a9637891ef9af69f59c32")) + ( 115000, uint256S("0x0ee382b4729b8ceb918a92913f9c144a6a4f8a50bfc0f8b4aac5b12592caed7f")) + ( 120000, uint256S("0x082a7918a0dd9cb2df65f55acb8d0a4a535b3fa684d92c3ebcb24ed7019d975b")) + ( 125000, uint256S("0x00008f76c4484fd539c9d02fc69c40a50b6f9e00984d33890b85cc0324159e9e")) + ( 130000, uint256S("0x011b09e53acfe46f310e8c960a9c4f4f490cc7b2cd3791d7a6a80d6e8ac96b36")) + ( 135000, uint256S("0x01e0cd48358fa05646baa6f00e26717474d6049a537c8861b324d1f497dc3d4a")) + ( 140000, uint256S("0x0e6db36fd8a9d1b7baf359c8bd5c76635d0bcada973a75b5d2028ca3baea4961")) + ( 145000, uint256S("0x00010c40b57316ce6cde076807c9db956452a3c82cb09fe7d56c6bb1a7e24726")) + ( 150000, uint256S("0x0a817f15b9da636f453a7a01835cfc534ed1a55ce7f08c566471d167678bedce")) + ( 155000, uint256S("0x0528084fd00223bd9747635d7a4d8cc79f158795cad654efb78e4e4cc5f23d6a")) + ( 160000, uint256S("0x00003a09f26ae9fb7ebbfa3ef589b81ccd8909a82430f7414bc68d5a5a3316ab")) + ( 165000, uint256S("0x00004a0c6a29e7d1f22ea4e44d05e861fec5fcd8eebc5a61574c4ecf29dbb9be")) + ( 170000, uint256S("0x0cf9eac27badc0ae9a2b370dd7cc3fcb550f139349551e60978f394a2e1b262b")) + ( 175000, uint256S("0x0000137856b825d431da27ff4c3cf22f5482fa21952d45b0db0ec6774fb9b510")) + ( 180000, uint256S("0x000000b0afcccf98aa0afb6ac61050892bd9415857d66313d1f67fd1bbac312f")) + ( 185000, uint256S("0x00c2af8f88d84de080067f8ae1c25754e32e5516d20c11f85b9adae2d683687b")) + ( 190000, uint256S("0x00000033d85b3e7d19e02278ef300b8ab957d3dd3e58b4c81166ba0a58af5c3f")) + ( 195000, uint256S("0x000000964b6068be1dd4ee6893d183e86cba82a2744fb5439c463d0ba7e053b6")) + ( 200000, uint256S("0x000001763a9337328651ca57ac487cc0507087be5838fb74ca4165ff19f0e84f")) + ( 205000, uint256S("0x049fc6832e64a75ae898b32804e151e7561ea49082858c3d4af89a7de4b82f06")) + ( 210000, uint256S("0x0000000d9078b9c9604cc663eafafba8f3643bb3f3ddbb78fed4993236e1edb5")) + ( 215000, uint256S("0x00060089ecc21bcc62094e2f7f0448fe163415f6ef2f2aafe047757889ca82fe")) + ( 220000, uint256S("0x000082c78e6c2a13a9c23dd7a6faaf962fc133142b4a2d07725561f59c03bfa2")) + ( 225000, uint256S("0x00030026483167fe13505cf27049307ce42e0d9c5aa093aed10baa4f49edf4ca")) + ( 230000, uint256S("0x000183a3e17988060a35776b99c1f0b43393bbe7153b2718dfc57f428191de4e")) + ( 235000, uint256S("0x000184995f0ec024ed3783e322c8cfa5e68d9f0c77c3aaea301b22d311619156")) + ( 240000, uint256S("0x0000002cc7cf6d0a44ab57f9bd3bfa11a865bbf1cd87a2081095bc90981633a3")) + ( 245000, uint256S("0x004c5f19a88c8fe8a604006dbd2d44c94baef2a00876a17d8e2be2124003f979")) + ( 250000, uint256S("0x0dd54ef5f816c7fde9d2b1c8c1a26412b3c761cc5dd3901fa5c4cd1900892fba")) + ( 255000, uint256S("0x0b6da9e4f50c8bc7a92c539bc7474ffd6c29e0a8531f0dbbbc261fff1f990827")) + ( 260000, uint256S("0x0cac8b12bf7233ee5a68fcde9e251852b177833fefa2a9f39ec28474b0851cb9")) + ( 265000, uint256S("0x04feb5b4029f3b8b8eb3e6661a78eadd1a26b4af00ac59b5f05b261afcfd2818")) + ( 270000, uint256S("0x01bc5897bd20b8b61acf4989987ba85fbc37d9ebe848924aa8effcb08bf48fe0")) + ( 275000, uint256S("0x0416bc29eb5a12231826e546ba90fcd38aeef387ff77b45849cd418a9c1a6f12")) + ( 280000, uint256S("0x000007593e9880b171d46bce59aa0cec2a1b1f53d1fd7e8f71ccb2b9182374a4")) + ( 285000, uint256S("0x05a338b2d90cd79740221fe8635b7a834f2e486fcbb2464a4294f5a21231a5f5")) + ( 290000, uint256S("0x064ca3912cdcd833702d07a530e98bc5c6c1cd738a8825c7240b17cd68ca0cc4")) + ( 295000, uint256S("0x036b3bb318d743fd78db983a9aadd52869991d48913c4eebe2a074387d67cc5a")) + ( 300000, uint256S("0x000000fa5efd1998959926047727519ed7de06dcf9f2cd92a4f71e907e1312dc")) + ( 305000, uint256S("0x00003656231e83de2348755153ed175794696a113d7e8a15c01f90fdb7c2f287")) + ( 310000, uint256S("0x0cf6baf727eb931da0813ed8b032648c4766be79e146b0d40c643f9d8edf40f7")) + ( 315000, uint256S("0x082469974c152ebe69f1787f0d06aa5d9dd1dc69c880febde7eac2bc800146dd")) + ( 320000, uint256S("0x0000063df36b99bfb2516f55cb548a5baed1f2d8ae69c3559dc478c5c2eb32df")) + ( 325000, uint256S("0x0cb926b303a1514ba0a2f729af88ccb143517f396e9e0bde09b0736900698e0f")) + ( 330000, uint256S("0x000000be3d8bb6e31c3b534819aae7014cbbe9a44ab3e799dc1bfc724c6ab184")) + ( 335000, uint256S("0x0d0756608189fd5bbd8ec50e76180074e69e973439cc09df49134e4cb970ed4d")) + ( 340000, uint256S("0x0d814eacdb9c97003d703c0ff79b1b97b9ed8615fe12b1afaede946e5fdfe0a7")) + ( 345000, uint256S("0x000000c2910f510f1de325d300202da1a391f2719dd378173299151c3da94e85")) + ( 350000, uint256S("0x0000000228ef321323f81dae00c98d7960fc7486fb2d881007fee60d1e34653f")) + ( 355000, uint256S("0x03e6a55e382b478e0fab9c3584da3629fd9b977986a333a406b24b0d3559bf44")) + ( 360000, uint256S("0x0859c86dd718bcb5b58af06389197794e2beea6239653f2e6fa7b8a7433d29ea")) + ( 365000, uint256S("0x07896332665c707a8f55398a998e7878e8d2681ba79dd95c2859b1dafc9343d0")) + ( 370000, uint256S("0x040efd8c64cf5cf96ecf75468741a8880d1386eb5e349bef0a55116d4023944c")) + ( 375000, uint256S("0x053029e7599a09fe6c01203997d7ca738dd4c6d216a433695a0d514def1eccc0")) + ( 380000, uint256S("0x0cae44e7a421c389b88a5a204d3e39779e93aeacaab1b693741bf279fd0c8acd")) + ( 385000, uint256S("0x0b4032d2c799ba93644231ce57134dd24e13ec0dc267c1ed5912389691d2bd72")) + ( 390000, uint256S("0x0afd0f166f33a881ef289af7ea7010d58c4bbd560dee10b561c79e1b8dfd0593")) + ( 395000, uint256S("0x083774b88cf1b138d67c242d9b33c54f69d7e901b5e8144dc4a2303ab9927102")) + ( 400000, uint256S("0x036d294c5be96f4c0efb28e652eb3968231e87204a823991a85c5fdab3c43ae6")) + ( 405000, uint256S("0x0522e33bb2161fb1b33acef9a4a438fcf420dcae8a0b472e234d223d731c42b2")) + ( 410000, uint256S("0x0361d06aa807c66b87befea8119a485341d1118b694c3dbb4c3cf0b85ac69e9b")) + ( 415000, uint256S("0x072d5653d8673f64ef8b9c655f7b8021072070a072b799013ff6e96de99a59e6")) + ( 420000, uint256S("0x013b693d66955be69d4501cb1d307ca323a5c8473e25866ae7e700cdce0c654f")) + ( 425000, uint256S("0x0ef0c55af27c6971289a790dee2b2ec728fb9c6555ff9306c07f1083cf0fb4b5")) + ( 430000, uint256S("0x0ccbeeaba28291e0316a9cf54c005097c61dc67ba6f32283406d6c83b828da00")) + ( 435000, uint256S("0x020ed6b7fe1124400baba7feed463ba0c90e7e6903493fdc1a1a18c4a506055a")) + ( 440000, uint256S("0x055aaadca1908abeedc831a3f9115aa31284fc223d010590caf7b612960b61a4")) + ( 445000, uint256S("0x06d2327fa25ea7e2be742fc0e45fc4f9adb41811f21be0357f8543c5434df715")) + ( 450000, uint256S("0x0906ef1e8dc194f1f03bd4ce1ac8c6992fd721ef2c5ccbf4871ec8cdbb456c18")) + ( 455000, uint256S("0x0b8b92eec29eb20262dcf9916f0ca36d6abf0c39d321d3f480a5535cb978db71")) + ( 460000, uint256S("0x0cb04591f69a255b1127aaff3bbd59eaa21a5d9cca999de197516c251895c536")) + ( 465000, uint256S("0x029985ae78d8bb8fd170aeb3ab02ea76134ed0c19ae00211cc28a61fe5755b88")) + ( 470000, uint256S("0x01a2f4b56f37b223e75572862ad1ba956ec179332f8cd40590d7253563c86ba8")) + ( 475000, uint256S("0x0a34c6f9d4d9cb8c78c14b8041a7cc1874cfcbb22a34a5c068d1d6ff3ed9fdf0")) + ( 480000, uint256S("0x0ebab25030179996ae25969f34f6a297c7ffce1994f9b4186082a47032a9a7dc")) + ( 485000, uint256S("0x06a096e6bccf3b85537a30f95db6a414deacc0509bc84da264c2830df1a1d9b0")) + ( 490000, uint256S("0x0af828930ef13405cb536b88a3d1d4e0d84dc79ee260402c56bfa86e261c74ff")) + ( 495000, uint256S("0x09d44905bfd12849d3c2178b2ba882f8e9d6565b6e4d7a97c70a92bd6de7c5e6")) + ( 500000, uint256S("0x0bebdb417f7a51fe0c36fcf94e2ed29895a9a862eaa61601272866a7ecd6391b")) + ( 505000, uint256S("0x0c1609f4f3561baa1fc975877948af94d2107c88686a9821bc240016cc87d953")) + ( 510000, uint256S("0x0cf9a5a4997b871e615e5e398627e45fa15b3e6970ae22b47bdd11b0f5fa0fa7")) + ( 515000, uint256S("0x034171d4819e9961de13309743a32a179abede97d60ea64101dc04c97a1a0807")) + ( 520000, uint256S("0x0648fa44d5bbc2cc04a782e083c11df64ac06185f0f8e11a7416625ebb6409a6")) + ( 525000, uint256S("0x0000000ef17d63af3159e52cd351b6f000536ad88adc3a937bb747955fed58a2")) + ( 530000, uint256S("0x08e3af153995ba09e50086b64145cf4cd57db6b29f16f06f28d80d7f6121cfad")) + ( 535000, uint256S("0x02a0ffd00b51e2061b85de50a9223d9c84f4e357dc1046397bb9d7d4a827a3fb")) + ( 540000, uint256S("0x04bf07d026af29025c1ac2815e067f4a41d2872701ac9780eb3015d51cdcd854")) + ( 545000, uint256S("0x0a0d6d86635946792ad0dca57ed227a5360fc8b6d79e47132aac11e90a4963ce")) + ( 550000, uint256S("0x06df52fc5f9ba03ccc3a7673b01ab47990bd5c4947f6e1bc0ba14d21cd5bcccd")) + ( 555000, uint256S("0x0baf38eea8e08fcad3a9d760f27377e79c291b08e7fb4920cadd5cb7bab547f3")) + ( 560000, uint256S("0x00000004c34abbf1366adbae965b644c01debf15409acc715ff51cb221d92dd7")) + ( 565000, uint256S("0x067bae7119f083e0fa1820bc8e25dcfa7717e42aabaef18beefd87d974953dfb")) + ( 570000, uint256S("0x00000011a7ce7b628b7be17777d8dea2574d83f165e23c9e44aa705975820fd3")) + ( 575000, uint256S("0x0e1110a193a30d3f8d369017233a2486b11c748b3d033859a2eb7b37062d303e")) + ( 580000, uint256S("0x083cb58484aff80f48e3537e0451d49e544b3efa3da97274800c91e567d33a92")) + ( 585000, uint256S("0x0224cf835428d03472edf4f7b6fcc63b9d8d6f1d5a90ad8186bf123d541b4ea8")) + ( 590000, uint256S("0x0cfcf3b9517894e4df49db5faf8b74f3a9e01eb83c0cc5051c115d4424615dae")) + ( 595000, uint256S("0x0000000a45266983dd81e0df381a3b0455699b2f76d5b4d3f17b87d657a1b56d")) + ( 600000, uint256S("0x00000005080d5689c3b4466e551cd1986e5d2024a62a79b1335afe12c42779e4")) + ( 605000, uint256S("0x0000001c691da36848542299af859d4eb3fa408a0f425b1fbe6d622d2100623a")) + ( 610000, uint256S("0x040d8c7a0ac89e3ed8605a198583a795986aacbf18722a9897d7b925bcf757f6")) + ( 615000, uint256S("0x0449cf00fc36206389c14cbf1d762f8b96bb0440ccea5b46703e7c69b0e2bc42")) + ( 620000, uint256S("0x07227a41340c25ee1a7e9b60414259780202ffa990079fc91d8faeac9af03e60")) + ( 625000, uint256S("0x047c2472fe2afabb3d38decf24bba4ba712b60e7a1782f4afae3ede3f912f493")) + ( 630000, uint256S("0x0a7f1f04e66260cf972ab1374a9126b8abc1adaa3ab4669db5d4d4ddb9ad493d")) + ( 635000, uint256S("0x048df95165eb821dabf37ef28cf7f3be72e216e95377684253dab806985b50a4")) + ( 640000, uint256S("0x066b3c6a6a3c8dc58bef509a972c3e3ade14493b40e1b361ecbc928134e302be")) + ( 645000, uint256S("0x07d059888c9ade3bbe16d6b4d70ee9b8302d104b37a3c6cd61f81012aabd0e1e")) + ( 650000, uint256S("0x039a3cb760cc6e564974caf69e8ae621c14567f3a36e4991f77fd869294b1d52")) + ( 655000, uint256S("0x089350ee8d28b44837eb4b1fe77704953d5de2077f10c74a888d9d3ea1e13c2a")) + ( 660000, uint256S("0x000000023f8a582a61ae2f6fab6fe8197e79b7a68aaac67432421b09f1bdd4ba")) + ( 665000, uint256S("0x0b16edce865e7a0d662115774e0c0d3abbf9c69004155b693ddc933f051bfb26")) + ( 670000, uint256S("0x09070b109b089490bc372fd8358abae352d6db0e46ade6ed2200e4d4ff7aa6af")) + ( 675000, uint256S("0x08d9edeed3b6ac55991e9f32af0218ff8fa9dc808078623f4c831eb09d4f186b")) + ( 680000, uint256S("0x00000003eb2b30bfac929d3496acecab19625ac9f854a86aaf9678bea99e1cc1")) + ( 681777, uint256S("0x0000243296b9b26c040f471fdd9398ef72e57062cf05c19b9ba2fefac8165306")), + (int64_t)1516924927, // * UNIX timestamp of last checkpoint block + (int64_t)1253783, // * total number of transactions between genesis and last checkpoint + // (the tx=... number in the SetBestChain debug.log lines) + (double)2777 // * estimated number of transactions per day after checkpoint + // total number of tx / (checkpoint block height / (24 * 24)) + }; + } + + mainParams.SetCheckpointData(checkpointData); + ASSETCHAIN_INIT = 1; return(0); } diff --git a/src/chainparams.h b/src/chainparams.h index 8499d7d17..00d2c255f 100644 --- a/src/chainparams.h +++ b/src/chainparams.h @@ -87,15 +87,18 @@ public: void SetRegTestCoinbaseMustBeProtected() { consensus.fCoinbaseMustBeProtected = true; } void SetDefaultPort(uint16_t port) { nDefaultPort = port; } + void SetCheckpointData(Checkpoints::CCheckpointData checkpointData); + //void setnonce(uint32_t nonce) { memcpy(&genesis.nNonce,&nonce,sizeof(nonce)); } //void settimestamp(uint32_t timestamp) { genesis.nTime = timestamp; } //void setgenesis(CBlock &block) { genesis = block; } //void recalc_genesis(uint32_t nonce) { genesis = CreateGenesisBlock(ASSETCHAINS_TIMESTAMP, nonce, GENESIS_NBITS, 1, COIN); }; int nDefaultPort = 0; CMessageHeader::MessageStartChars pchMessageStart; // jl777 moved + Consensus::Params consensus; + protected: CChainParams() {} - Consensus::Params consensus; //! Raw pub key bytes for the broadcast alert signing key. std::vector vAlertPubKey; diff --git a/src/dpowassets b/src/dpowassets index 6c1c75c2c..3fe8aa1b0 100755 --- a/src/dpowassets +++ b/src/dpowassets @@ -13,11 +13,9 @@ curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dp curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"BET\",\"pubkey\":\"$pubkey\"}" curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CRYPTO\",\"pubkey\":\"$pubkey\"}" curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"HODL\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"SHARK\",\"pubkey\":\"$pubkey\"}" curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"MSHARK\",\"pubkey\":\"$pubkey\"}" curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"BOTS\",\"pubkey\":\"$pubkey\"}" curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"MGW\",\"pubkey\":\"$pubkey\"}" -#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"MVP\",\"pubkey\":\"$pubkey\"}" curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"COQUI\",\"pubkey\":\"$pubkey\"}" curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"WLC\",\"pubkey\":\"$pubkey\"}" curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"KV\",\"pubkey\":\"$pubkey\"}" @@ -25,6 +23,11 @@ curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dp curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"MESH\",\"pubkey\":\"$pubkey\"}" curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"MNZ\",\"pubkey\":\"$pubkey\"}" curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CHIPS\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"AXO\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"ETOMIC\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"BTCH\",\"pubkey\":\"$pubkey\"}" +#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CHAIN\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"VOTE\",\"pubkey\":\"$pubkey\"}" #curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"USD\",\"pubkey\":\"$pubkey\"}" diff --git a/src/fiat-cli b/src/fiat-cli index 5c8940f82..81ed6b56a 100755 --- a/src/fiat-cli +++ b/src/fiat-cli @@ -1,37 +1,37 @@ #!/bin/bash #set -x -echo aud; fiat/aud $1 $2 $3 $4 -echo bgn; fiat/bgn $1 $2 $3 $4 -echo cad; fiat/cad $1 $2 $3 $4 -echo chf; fiat/chf $1 $2 $3 $4 -echo cny; fiat/cny $1 $2 $3 $4 -echo czk; fiat/czk $1 $2 $3 $4 -echo dkk; fiat/dkk $1 $2 $3 $4 -echo eur; fiat/eur $1 $2 $3 $4 -echo gbp; fiat/gbp $1 $2 $3 $4 -echo hkd; fiat/hkd $1 $2 $3 $4 -echo hrk; fiat/hrk $1 $2 $3 $4 -echo huf; fiat/huf $1 $2 $3 $4 -echo idr; fiat/idr $1 $2 $3 $4 -echo ils; fiat/ils $1 $2 $3 $4 -echo inr; fiat/inr $1 $2 $3 $4 -echo jpy; fiat/jpy $1 $2 $3 $4 -echo krw; fiat/krw $1 $2 $3 $4 -echo mxn; fiat/mxn $1 $2 $3 $4 -echo myr; fiat/myr $1 $2 $3 $4 -echo nok; fiat/nok $1 $2 $3 $4 -echo nzd; fiat/nzd $1 $2 $3 $4 -echo php; fiat/php $1 $2 $3 $4 -echo pln; fiat/pln $1 $2 $3 $4 -echo brl; fiat/brl $1 $2 $3 $4 -echo ron; fiat/ron $1 $2 $3 $4 -echo rub; fiat/rub $1 $2 $3 $4 -echo sek; fiat/sek $1 $2 $3 $4 -echo sgd; fiat/sgd $1 $2 $3 $4 -echo thb; fiat/thb $1 $2 $3 $4 -echo try; fiat/try $1 $2 $3 $4 -echo usd; fiat/usd $1 $2 $3 $4 -echo zar; fiat/zar $1 $2 $3 $4 +#echo aud; fiat/aud $1 $2 $3 $4 +#echo bgn; fiat/bgn $1 $2 $3 $4 +#echo cad; fiat/cad $1 $2 $3 $4 +#echo chf; fiat/chf $1 $2 $3 $4 +#echo cny; fiat/cny $1 $2 $3 $4 +#echo czk; fiat/czk $1 $2 $3 $4 +#echo dkk; fiat/dkk $1 $2 $3 $4 +#echo eur; fiat/eur $1 $2 $3 $4 +#echo gbp; fiat/gbp $1 $2 $3 $4 +#echo hkd; fiat/hkd $1 $2 $3 $4 +#echo hrk; fiat/hrk $1 $2 $3 $4 +#echo huf; fiat/huf $1 $2 $3 $4 +#echo idr; fiat/idr $1 $2 $3 $4 +#echo ils; fiat/ils $1 $2 $3 $4 +#echo inr; fiat/inr $1 $2 $3 $4 +#echo jpy; fiat/jpy $1 $2 $3 $4 +#echo krw; fiat/krw $1 $2 $3 $4 +#echo mxn; fiat/mxn $1 $2 $3 $4 +#echo myr; fiat/myr $1 $2 $3 $4 +#echo nok; fiat/nok $1 $2 $3 $4 +#echo nzd; fiat/nzd $1 $2 $3 $4 +#echo php; fiat/php $1 $2 $3 $4 +#echo pln; fiat/pln $1 $2 $3 $4 +#echo brl; fiat/brl $1 $2 $3 $4 +#echo ron; fiat/ron $1 $2 $3 $4 +#echo rub; fiat/rub $1 $2 $3 $4 +#echo sek; fiat/sek $1 $2 $3 $4 +#echo sgd; fiat/sgd $1 $2 $3 $4 +#echo thb; fiat/thb $1 $2 $3 $4 +#echo try; fiat/try $1 $2 $3 $4 +#echo usd; fiat/usd $1 $2 $3 $4 +#echo zar; fiat/zar $1 $2 $3 $4 echo revs; fiat/revs $1 $2 $3 $4 echo supernet; fiat/supernet $1 $2 $3 $4 echo dex; fiat/dex $1 $2 $3 $4 @@ -40,7 +40,7 @@ echo jumblr; fiat/jumblr $1 $2 $3 $4 echo bet; fiat/bet $1 $2 $3 $4 echo crypto; fiat/crypto $1 $2 $3 $4 echo hodl; fiat/hodl $1 $2 $3 $4 -echo shark; fiat/shark $1 $2 $3 $4 +#echo shark; fiat/shark $1 $2 $3 $4 echo mshark; fiat/mshark $1 $2 $3 $4 echo bots; fiat/bots $1 $2 $3 $4 echo mgw; fiat/mgw $1 $2 $3 $4 @@ -51,3 +51,9 @@ echo kv; fiat/kv $1 $2 $3 $4 echo ceal; fiat/ceal $1 $2 $3 $4 echo mesh; fiat/mesh $1 $2 $3 $4 echo mnz; fiat/mnz $1 $2 $3 $4 +echo axo; fiat/axo $1 $2 $3 $4 +echo etomic; fiat/etomic $1 $2 $3 $4 +echo btch; fiat/btch $1 $2 $3 $4 +echo pizza; fiat/pizza $1 $2 $3 $4 +echo beer; fiat/beer $1 $2 $3 $4 +echo vote; fiat/vote $1 $2 $3 $4 diff --git a/src/fiat/aud b/src/fiat/aud deleted file mode 100755 index 6fa6e2cbb..000000000 --- a/src/fiat/aud +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=AUD $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/axo b/src/fiat/axo new file mode 100755 index 000000000..18d38cac0 --- /dev/null +++ b/src/fiat/axo @@ -0,0 +1,2 @@ +#!/bin/bash +./komodo-cli -ac_name=AXO $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/beer b/src/fiat/beer new file mode 100755 index 000000000..34317bb93 --- /dev/null +++ b/src/fiat/beer @@ -0,0 +1,2 @@ +#!/bin/bash +./komodo-cli -ac_name=BEER $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/bgn b/src/fiat/bgn deleted file mode 100755 index fdc0f5763..000000000 --- a/src/fiat/bgn +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=BGN $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/brl b/src/fiat/brl deleted file mode 100755 index b36365d99..000000000 --- a/src/fiat/brl +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=BRL $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/btch b/src/fiat/btch new file mode 100755 index 000000000..6a57ea8d1 --- /dev/null +++ b/src/fiat/btch @@ -0,0 +1,2 @@ +#!/bin/bash +./komodo-cli -ac_name=BTCH $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/cad b/src/fiat/cad deleted file mode 100755 index 509150867..000000000 --- a/src/fiat/cad +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=CAD $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/chf b/src/fiat/chf deleted file mode 100755 index fbe57148c..000000000 --- a/src/fiat/chf +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=CHF $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/cny b/src/fiat/cny deleted file mode 100755 index aa4e2ca25..000000000 --- a/src/fiat/cny +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=CNY $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/czk b/src/fiat/czk deleted file mode 100755 index c0c1072d2..000000000 --- a/src/fiat/czk +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=CZK $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/dkk b/src/fiat/dkk deleted file mode 100755 index aaa6108e0..000000000 --- a/src/fiat/dkk +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=DKK $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/etomic b/src/fiat/etomic new file mode 100755 index 000000000..76eb0191c --- /dev/null +++ b/src/fiat/etomic @@ -0,0 +1,2 @@ +#!/bin/bash +./komodo-cli -ac_name=ETOMIC $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/eur b/src/fiat/eur deleted file mode 100755 index 67de01b7d..000000000 --- a/src/fiat/eur +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=EUR $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/gbp b/src/fiat/gbp deleted file mode 100755 index eb4528f95..000000000 --- a/src/fiat/gbp +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=GBP $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/hkd b/src/fiat/hkd deleted file mode 100755 index 006ba7fe6..000000000 --- a/src/fiat/hkd +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=HKD $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/hrk b/src/fiat/hrk deleted file mode 100755 index 393b21fe3..000000000 --- a/src/fiat/hrk +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=HRK $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/huf b/src/fiat/huf deleted file mode 100755 index 55a4f7c50..000000000 --- a/src/fiat/huf +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=HUF $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/idr b/src/fiat/idr deleted file mode 100755 index 62ce7968d..000000000 --- a/src/fiat/idr +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=IDR $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/ils b/src/fiat/ils deleted file mode 100755 index de1e552b8..000000000 --- a/src/fiat/ils +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=ILS $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/inr b/src/fiat/inr deleted file mode 100755 index 10ffc9d51..000000000 --- a/src/fiat/inr +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=INR $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/jpy b/src/fiat/jpy deleted file mode 100755 index 5b8fd3768..000000000 --- a/src/fiat/jpy +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=JPY $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/krw b/src/fiat/krw deleted file mode 100755 index 7b895b1f4..000000000 --- a/src/fiat/krw +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=KRW $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/mvp b/src/fiat/mvp deleted file mode 100755 index 998d700a3..000000000 --- a/src/fiat/mvp +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=MVP $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/mxn b/src/fiat/mxn deleted file mode 100755 index d5d8d97fb..000000000 --- a/src/fiat/mxn +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=MXN $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/myr b/src/fiat/myr deleted file mode 100755 index 8c700a53c..000000000 --- a/src/fiat/myr +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=MYR $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/nok b/src/fiat/nok deleted file mode 100755 index e0e35b444..000000000 --- a/src/fiat/nok +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=NOK $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/nzd b/src/fiat/nzd deleted file mode 100755 index c9610b218..000000000 --- a/src/fiat/nzd +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=NZD $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/php b/src/fiat/php deleted file mode 100755 index c22e73293..000000000 --- a/src/fiat/php +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=PHP $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/pizza b/src/fiat/pizza new file mode 100755 index 000000000..d8400d9d3 --- /dev/null +++ b/src/fiat/pizza @@ -0,0 +1,2 @@ +#!/bin/bash +./komodo-cli -ac_name=PIZZA $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/pln b/src/fiat/pln deleted file mode 100755 index 6dfb0debb..000000000 --- a/src/fiat/pln +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=PLN $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/ron b/src/fiat/ron deleted file mode 100755 index 0b2a6effd..000000000 --- a/src/fiat/ron +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=RON $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/rub b/src/fiat/rub deleted file mode 100755 index 8d1575578..000000000 --- a/src/fiat/rub +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=RUB $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/sek b/src/fiat/sek deleted file mode 100755 index 25a14d414..000000000 --- a/src/fiat/sek +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=SEK $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/sgd b/src/fiat/sgd deleted file mode 100755 index 89a1bc5ae..000000000 --- a/src/fiat/sgd +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=SGD $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/shark b/src/fiat/shark deleted file mode 100755 index 4bda53889..000000000 --- a/src/fiat/shark +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=SHARK $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/thb b/src/fiat/thb deleted file mode 100755 index ed72913c1..000000000 --- a/src/fiat/thb +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=THB $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/try b/src/fiat/try deleted file mode 100755 index dcfa574a6..000000000 --- a/src/fiat/try +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=TRY $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/usd b/src/fiat/usd deleted file mode 100755 index 81b9e16c6..000000000 --- a/src/fiat/usd +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=USD $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/vote b/src/fiat/vote new file mode 100755 index 000000000..67f47953e --- /dev/null +++ b/src/fiat/vote @@ -0,0 +1,2 @@ +#!/bin/bash +./komodo-cli -ac_name=VOTE $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/zar b/src/fiat/zar deleted file mode 100755 index a3dd891c0..000000000 --- a/src/fiat/zar +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=ZAR $1 $2 $3 $4 $5 $6 diff --git a/src/komodo.h b/src/komodo.h index e8ab6d6be..c6467d957 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -551,7 +551,7 @@ int32_t komodo_voutupdate(int32_t *isratificationp,int32_t notaryid,uint8_t *scr if ( signedfp == 0 ) { char fname[512]; - komodo_statefname(fname,(char *)"",(char *)"signedmasks"); + komodo_statefname(fname,ASSETCHAINS_SYMBOL,(char *)"signedmasks"); if ( (signedfp= fopen(fname,"rb+")) == 0 ) signedfp = fopen(fname,"wb"); else fseek(signedfp,0,SEEK_END); @@ -692,8 +692,25 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block) (numvalid >= KOMODO_MINRATIFY && ASSETCHAINS_SYMBOL[0] != 0) || numvalid > (numnotaries/5)) ) { - if ( height > 500000 || ASSETCHAINS_SYMBOL[0] != 0 ) - printf("[%s] ht.%d txi.%d signedmask.%llx numvins.%d numvouts.%d <<<<<<<<<<< notarized\n",ASSETCHAINS_SYMBOL,height,i,(long long)signedmask,numvins,numvouts); + if ( ASSETCHAINS_SYMBOL[0] != 0 ) + { + static FILE *signedfp; + if ( signedfp == 0 ) + { + char fname[512]; + komodo_statefname(fname,ASSETCHAINS_SYMBOL,(char *)"signedmasks"); + if ( (signedfp= fopen(fname,"rb+")) == 0 ) + signedfp = fopen(fname,"wb"); + else fseek(signedfp,0,SEEK_END); + } + if ( signedfp != 0 ) + { + fwrite(&height,1,sizeof(height),signedfp); + fwrite(&signedmask,1,sizeof(signedmask),signedfp); + fflush(signedfp); + } + printf("[%s] ht.%d txi.%d signedmask.%llx numvins.%d numvouts.%d <<<<<<<<<<< notarized\n",ASSETCHAINS_SYMBOL,height,i,(long long)signedmask,numvins,numvouts); + } notarized = 1; } if ( NOTARY_PUBKEY33[0] != 0 && ASSETCHAINS_SYMBOL[0] == 0 ) diff --git a/src/komodo_kv.h b/src/komodo_kv.h index 0d86fadd0..9aca2d387 100644 --- a/src/komodo_kv.h +++ b/src/komodo_kv.h @@ -101,6 +101,8 @@ void komodo_kvupdate(uint8_t *opretbuf,int32_t opretlen,uint64_t value) { static uint256 zeroes; uint32_t flags; uint256 pubkey,refpubkey,sig; int32_t i,refvaluesize,hassig,coresize,haspubkey,height,kvheight; uint16_t keylen,valuesize,newflag = 0; uint8_t *key,*valueptr,keyvalue[IGUANA_MAXSCRIPTSIZE]; struct komodo_kv *ptr; char *transferpubstr,*tstr; uint64_t fee; + if ( ASSETCHAINS_SYMBOL[0] == 0 ) // disable KV for KMD + return; iguana_rwnum(0,&opretbuf[1],sizeof(keylen),&keylen); iguana_rwnum(0,&opretbuf[3],sizeof(valuesize),&valuesize); iguana_rwnum(0,&opretbuf[5],sizeof(height),&height); diff --git a/src/komodo_utils.h b/src/komodo_utils.h index ef64ad75c..2bc6ea1e7 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -1364,7 +1364,7 @@ void komodo_configfile(char *symbol,uint16_t port) { if ( (fp= fopen(fname,"wb")) != 0 ) { - fprintf(fp,"rpcuser=user%u\nrpcpassword=pass%s\nrpcport=%u\nserver=1\ntxindex=1\n\n",crc,password,port); + fprintf(fp,"rpcuser=user%u\nrpcpassword=pass%s\nrpcport=%u\nserver=1\ntxindex=1\nrpcworkqueue=64\n",crc,password,port); fclose(fp); printf("Created (%s)\n",fname); } else printf("Couldnt create (%s)\n",fname); @@ -1494,12 +1494,12 @@ int32_t komodo_whoami(char *pubkeystr,int32_t height) char *argv0suffix[] = { - (char *)"mnzd", (char *)"mnz-cli", (char *)"mnzd.exe", (char *)"mnz-cli.exe" + (char *)"mnzd", (char *)"mnz-cli", (char *)"mnzd.exe", (char *)"mnz-cli.exe", (char *)"btchd", (char *)"btch-cli", (char *)"btchd.exe", (char *)"btch-cli.exe" }; char *argv0names[] = { - (char *)"MNZ", (char *)"MNZ", (char *)"MNZ", (char *)"MNZ" + (char *)"MNZ", (char *)"MNZ", (char *)"MNZ", (char *)"MNZ", (char *)"BTCH", (char *)"BTCH", (char *)"BTCH", (char *)"BTCH" }; void komodo_args(char *argv0) diff --git a/src/miner.cpp b/src/miner.cpp index 5c12d0af6..d7fc3a94d 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -398,7 +398,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn) txNew.vin[0].scriptSig = CScript() << nHeight << OP_0; if ( ASSETCHAINS_SYMBOL[0] == 0 ) { - int32_t i,opretlen; uint8_t opret[256],*ptr; + /*int32_t i,opretlen; uint8_t opret[256],*ptr; if ( (nHeight % 60) == 0 || komodo_gateway_deposits(&txNew,(char *)"KMD",1) == 0 ) { if ( (opretlen= komodo_pax_opreturn((int32_t)nHeight,opret,sizeof(opret))) > 0 ) // have pricefeed @@ -411,7 +411,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn) txNew.vout[1].nValue = 0; //fprintf(stderr,"opretlen.%d\n",opretlen); } //else printf("null opretlen for prices\n"); - } + }*/ } else if ( komodo_is_issuer() != 0 ) { diff --git a/src/policy/fees.cpp b/src/policy/fees.cpp index d4965a9b5..dd534d803 100644 --- a/src/policy/fees.cpp +++ b/src/policy/fees.cpp @@ -61,7 +61,7 @@ unsigned int TxConfirmStats::FindBucketIndex(double val) if ( it != bucketMap.end() ) { static uint32_t counter; - if ( counter++ < 10 ) + if ( counter++ < 1 ) fprintf(stderr,"%s FindBucketIndex violation: from val %f\n",ASSETCHAINS_SYMBOL,val); } return it->second; diff --git a/src/txdb.cpp b/src/txdb.cpp index 868d3d4cd..9a23596d9 100644 --- a/src/txdb.cpp +++ b/src/txdb.cpp @@ -302,6 +302,7 @@ bool CBlockTreeDB::LoadBlockIndexGuts() pindexNew->nUndoPos = diskindex.nUndoPos; pindexNew->hashAnchor = diskindex.hashAnchor; pindexNew->nVersion = diskindex.nVersion; + pindexNew->hashReserved = diskindex.hashReserved; pindexNew->hashMerkleRoot = diskindex.hashMerkleRoot; pindexNew->nTime = diskindex.nTime; pindexNew->nBits = diskindex.nBits; diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index dbc3aab84..ccf4fc34a 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -105,8 +105,8 @@ void WalletTxToJSON(const CWalletTx& wtx, UniValue& entry) string AccountFromValue(const UniValue& value) { string strAccount = value.get_str(); - if (strAccount != "") - throw JSONRPCError(RPC_WALLET_ACCOUNTS_UNSUPPORTED, "Accounts are unsupported"); + //if (strAccount != "") + // throw JSONRPCError(RPC_WALLET_ACCOUNTS_UNSUPPORTED, "Accounts are unsupported"); return strAccount; } @@ -503,6 +503,8 @@ UniValue kvupdate(const UniValue& params, bool fHelp) throw runtime_error("kvupdate key value flags/passphrase"); if (!EnsureWalletIsAvailable(fHelp)) return 0; + if ( ASSETCHAINS_SYMBOL[0] == 0 ) + return(0); haveprivkey = 0; memset(&sig,0,sizeof(sig)); memset(&privkey,0,sizeof(privkey)); @@ -616,7 +618,7 @@ UniValue paxdeposit(const UniValue& params, bool fHelp) bool fSubtractFeeFromAmount = false; if ( KOMODO_PAX == 0 ) { - throw runtime_error("paxdeposit dispabled without -pax"); + throw runtime_error("paxdeposit disabled without -pax"); } if ( komodo_is_issuer() != 0 ) throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "paxdeposit only from KMD"); @@ -1239,8 +1241,8 @@ UniValue sendmany(const UniValue& params, bool fHelp) if (!address.IsValid()) throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid Komodo address: ")+name_); - if (setAddress.count(address)) - throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+name_); + //if (setAddress.count(address)) + // throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+name_); setAddress.insert(address); CScript scriptPubKey = GetScriptForDestination(address.Get()); @@ -1263,7 +1265,8 @@ UniValue sendmany(const UniValue& params, bool fHelp) EnsureWalletIsUnlocked(); // Check funds - CAmount nBalance = GetAccountBalance(strAccount, nMinDepth, ISMINE_SPENDABLE); + CAmount nBalance = pwalletMain->GetBalance(); + //CAmount nBalance = GetAccountBalance(strAccount, nMinDepth, ISMINE_SPENDABLE); if (totalAmount > nBalance) throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Account has insufficient funds"); diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 67f7a7fe0..9dc96f10c 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2733,10 +2733,10 @@ bool CWallet::CreateTransaction(const vector& vecSend, CWalletTx& wt //a chance at a free transaction. //But mempool inputs might still be in the mempool, so their age stays 0 //fprintf(stderr,"nCredit %.8f interest %.8f\n",(double)nCredit/COIN,(double)pcoin.first->vout[pcoin.second].interest/COIN); - if ( KOMODO_EXCHANGEWALLET == 0 ) + if ( KOMODO_EXCHANGEWALLET == 0 && ASSETCHAINS_SYMBOL[0] == 0 ) { interest2 += pcoin.first->vout[pcoin.second].interest; - fprintf(stderr,"%.8f ",(double)pcoin.first->vout[pcoin.second].interest/COIN); + //fprintf(stderr,"%.8f ",(double)pcoin.first->vout[pcoin.second].interest/COIN); } int age = pcoin.first->GetDepthInMainChain(); if (age != 0) @@ -2749,7 +2749,7 @@ bool CWallet::CreateTransaction(const vector& vecSend, CWalletTx& wt //interest = 0; // interest2 also //} CAmount nChange = (nValueIn - nValue + interest2); -fprintf(stderr,"wallet change %.8f (%.8f - %.8f) interest2 %.8f total %.8f\n",(double)nChange/COIN,(double)nValueIn/COIN,(double)nValue/COIN,(double)interest2/COIN,(double)nTotalValue/COIN); +//fprintf(stderr,"wallet change %.8f (%.8f - %.8f) interest2 %.8f total %.8f\n",(double)nChange/COIN,(double)nValueIn/COIN,(double)nValue/COIN,(double)interest2/COIN,(double)nTotalValue/COIN); if (nSubtractFeeFromAmount == 0) nChange -= nFeeRet;