This commit is contained in:
blackjok3r
2018-11-30 01:53:45 +08:00
parent 7ca059a0fb
commit a4313d4536
3 changed files with 4 additions and 40 deletions

View File

@@ -581,9 +581,9 @@ endif
# bitcoin-cli binary #
komodo_cli_SOURCES = bitcoin-cli.cpp
komodo_cli_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CFLAGS) -DCLI
komodo_cli_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -DCLI
komodo_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) -DCLI
komodo_cli_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CFLAGS)
komodo_cli_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
komodo_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
# wallet-utility binary #
if ENABLE_WALLET

View File

@@ -67,31 +67,6 @@ public:
};
/*
#define FROM_CLI
#include "uint256.h"
#include "arith_uint256.h"
#include "komodo_structs.h"
#include "komodo_globals.h"
#include "komodo_utils.h"
#include "komodo_cJSON.c"
#include "komodo_notary.h"
#include "notaries_staked.cpp"
void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotaries,uint8_t notaryid,uint256 txhash,uint64_t voutmask,uint8_t numvouts,uint32_t *pvals,uint8_t numpvals,int32_t KMDheight,uint32_t KMDtimestamp,uint64_t opretvalue,uint8_t *opretbuf,uint16_t opretlen,uint16_t vout,uint256 MoM,int32_t MoMdepth)
{
}
uint32_t komodo_heightstamp(int32_t height)
{
return(0);
}
*/
//
// This function returns either one of EXIT_ codes when it's expected to stop the process or
// CONTINUE_EXECUTION when it's expected to continue further.
@@ -106,7 +81,6 @@ static int AppInitRPC(int argc, char* argv[])
// Parameters
//
ParseParameters(argc, argv);
//komodo_args(argv[0]);
std:string name;
name = GetArg("-ac_name","");
if ( !name.empty() )
@@ -225,7 +199,7 @@ UniValue CallRPC(const std::string& strMethod, const UniValue& params)
{
std::string host = GetArg("-rpcconnect", "127.0.0.1");
int port = GetArg("-rpcport", BaseParams().RPCPort());
//BITCOIND_RPCPORT = port;
BITCOIND_RPCPORT = port;
// Obtain event base
raii_event_base base = obtain_event_base();

View File

@@ -36,11 +36,6 @@ int32_t STAKED_era(int timestamp)
return(0);
};
#ifdef CLI
int8_t updateStakedNotary() {
return(-1);
}
#else
int8_t updateStakedNotary() {
std::string notaryname;
char Raddress[18]; uint8_t pubkey33[33];
@@ -50,7 +45,6 @@ int8_t updateStakedNotary() {
NOTARY_ADDRESS.assign(Raddress);
return(StakedNotaryID(notaryname,Raddress));
}
#endif
int8_t StakedNotaryID(std::string &notaryname, char *Raddress) {
if ( STAKED_ERA != 0 )
@@ -160,12 +154,8 @@ void UpdateNotaryAddrs(uint8_t pubkeys[64][33],int8_t numNotaries) {
// staked era is set.
pthread_mutex_lock(&staked_mutex);
for (int i = 0; i<numNotaries; i++) {
#ifdef CLI
NUM_NOTARIES = 0;
#else
pubkey2addr((char *)NOTARYADDRS[i],(uint8_t *)pubkeys[i]);
NUM_NOTARIES = numNotaries;
#endif
}
pthread_mutex_unlock(&staked_mutex);
}