From a23b0e8388aecd462fafad1042c5a64d25ae4118 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sun, 15 Nov 2020 10:28:53 -0500 Subject: [PATCH] Remove the unsupported concept of staked notaries --- src/Makefile.am | 2 - src/bitcoind.cpp | 22 +---- src/cc/CCinclude.h | 5 +- src/cc/eval.h | 5 +- src/cc/import.cpp | 5 +- src/chain.h | 5 +- src/crosschain.h | 10 +-- src/crosschain_authority.cpp | 26 +----- src/hash.h | 2 +- src/{komodo.h => hush.h} | 29 +++---- src/hush_notary.h | 8 +- src/hush_utils.h | 19 ++-- src/komodo_bitcoind.h | 4 +- src/komodo_defs.h | 10 +-- src/komodo_events.h | 4 +- src/komodo_gateway.h | 4 +- src/komodo_globals.h | 6 +- src/main.cpp | 11 ++- src/miner.cpp | 18 ++-- src/net.cpp | 14 +-- src/notaries_staked.cpp | 29 ------- src/notaries_staked.h | 100 ---------------------- src/notarisationdb.cpp | 12 +-- src/random.cpp | 2 +- src/rpc/crosschain.cpp | 37 +++----- src/rpc/misc.cpp | 60 ++++++------- src/rpc/rawtransaction.cpp | 2 +- src/wallet/asyncrpcoperation_sendmany.cpp | 4 - src/wallet/rpcwallet.cpp | 13 +-- src/wallet/wallet.cpp | 1 - zcutil/build.sh | 2 +- 31 files changed, 119 insertions(+), 352 deletions(-) rename src/{komodo.h => hush.h} (98%) delete mode 100644 src/notaries_staked.cpp delete mode 100644 src/notaries_staked.h diff --git a/src/Makefile.am b/src/Makefile.am index 0bc49fc94..dbae00399 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -180,7 +180,6 @@ BITCOIN_CORE_H = \ mruset.h \ net.h \ netbase.h \ - notaries_staked.h \ noui.h \ policy/fees.h \ pow.h \ @@ -302,7 +301,6 @@ libbitcoin_server_a_SOURCES = \ metrics.h \ miner.cpp \ net.cpp \ - notaries_staked.cpp \ noui.cpp \ notarisationdb.cpp \ policy/fees.cpp \ diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index f8531b2cc..6e66faf3a 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2013 The Bitcoin Core developers -// Copyright (c) 2019 The Hush developers +// Copyright (c) 2019-2020 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html @@ -28,11 +28,9 @@ #include "util.h" #include "httpserver.h" #include "httprpc.h" - #include #include #include - #include #ifdef _WIN32 @@ -72,22 +70,6 @@ void WaitForShutdown(boost::thread_group* threadGroup) { int32_t i,height; CBlockIndex *pindex; bool fShutdown = ShutdownRequested(); const uint256 zeroid; // Tell the main threads to shutdown. - /* - if (komodo_currentheight()>KOMODO_EARLYTXID_HEIGHT && KOMODO_EARLYTXID!=zeroid && ((height=tx_height(KOMODO_EARLYTXID))==0 || height>KOMODO_EARLYTXID_HEIGHT)) - { - fprintf(stderr,"%s: error: earlytx must be before block height %d or tx does not exist\n",__FUNCTION__, KOMODO_EARLYTXID_HEIGHT); - fprintf(stderr,"%s: earlytxid=%s, tx_height=%d, komodo_currentheight=%d\n", __FUNCTION__, KOMODO_EARLYTXID.GetHex().c_str(), tx_height(KOMODO_EARLYTXID), komodo_currentheight() ); - StartShutdown(); - } - */ - /*if ( ASSETCHAINS_STAKED == 0 && ASSETCHAINS_ADAPTIVEPOW == 0 && (pindex= komodo_chainactive(1)) != 0 ) - { - if ( pindex->nTime > ADAPTIVEPOW_CHANGETO_DEFAULTON ) - { - ASSETCHAINS_ADAPTIVEPOW = 1; - fprintf(stderr,"default activate adaptivepow\n"); - } else fprintf(stderr,"height1 time %u vs %u\n",pindex->nTime,ADAPTIVEPOW_CHANGETO_DEFAULTON); - } //else fprintf(stderr,"cant find height 1\n");*/ if ( ASSETCHAINS_CBOPRET != 0 ) { komodo_pricesinit(); @@ -135,7 +117,7 @@ void WaitForShutdown(boost::thread_group* threadGroup) // // Start // -extern int32_t IS_KOMODO_NOTARY,USE_EXTERNAL_PUBKEY; +extern int32_t IS_HUSH_NOTARY,USE_EXTERNAL_PUBKEY; extern uint32_t ASSETCHAIN_INIT; extern std::string NOTARY_PUBKEY; int32_t komodo_is_issuer(); diff --git a/src/cc/CCinclude.h b/src/cc/CCinclude.h index 7535f881e..11b5d86f0 100644 --- a/src/cc/CCinclude.h +++ b/src/cc/CCinclude.h @@ -1,3 +1,6 @@ +// Copyright (c) 2019-2020 The Hush developers +// Distributed under the GPLv3 software license, see the accompanying +// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html /****************************************************************************** * Copyright © 2014-2019 The SuperNET Developers. * * * @@ -50,8 +53,6 @@ Details. /// so it can lookup directly all transactions to any address. /// This is a key performance boosting thing as if it wasnt there, trying to get all the utxo for an address not in the wallet is quite time consuming. /// -/// More information about Antara framework: -/// https://developers.komodoplatform.com/basic-docs/start-here/about-komodo-platform/product-introductions.html#smart-chains-antara #include #include