clean up
This commit is contained in:
@@ -581,9 +581,9 @@ endif
|
|||||||
|
|
||||||
# bitcoin-cli binary #
|
# bitcoin-cli binary #
|
||||||
komodo_cli_SOURCES = bitcoin-cli.cpp
|
komodo_cli_SOURCES = bitcoin-cli.cpp
|
||||||
komodo_cli_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CFLAGS) -DCLI
|
komodo_cli_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CFLAGS)
|
||||||
komodo_cli_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -DCLI
|
komodo_cli_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
||||||
komodo_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) -DCLI
|
komodo_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
|
||||||
|
|
||||||
# wallet-utility binary #
|
# wallet-utility binary #
|
||||||
if ENABLE_WALLET
|
if ENABLE_WALLET
|
||||||
|
|||||||
@@ -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
|
// 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.
|
// CONTINUE_EXECUTION when it's expected to continue further.
|
||||||
@@ -106,7 +81,6 @@ static int AppInitRPC(int argc, char* argv[])
|
|||||||
// Parameters
|
// Parameters
|
||||||
//
|
//
|
||||||
ParseParameters(argc, argv);
|
ParseParameters(argc, argv);
|
||||||
//komodo_args(argv[0]);
|
|
||||||
std:string name;
|
std:string name;
|
||||||
name = GetArg("-ac_name","");
|
name = GetArg("-ac_name","");
|
||||||
if ( !name.empty() )
|
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");
|
std::string host = GetArg("-rpcconnect", "127.0.0.1");
|
||||||
int port = GetArg("-rpcport", BaseParams().RPCPort());
|
int port = GetArg("-rpcport", BaseParams().RPCPort());
|
||||||
//BITCOIND_RPCPORT = port;
|
BITCOIND_RPCPORT = port;
|
||||||
// Obtain event base
|
// Obtain event base
|
||||||
raii_event_base base = obtain_event_base();
|
raii_event_base base = obtain_event_base();
|
||||||
|
|
||||||
|
|||||||
@@ -36,11 +36,6 @@ int32_t STAKED_era(int timestamp)
|
|||||||
return(0);
|
return(0);
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CLI
|
|
||||||
int8_t updateStakedNotary() {
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
int8_t updateStakedNotary() {
|
int8_t updateStakedNotary() {
|
||||||
std::string notaryname;
|
std::string notaryname;
|
||||||
char Raddress[18]; uint8_t pubkey33[33];
|
char Raddress[18]; uint8_t pubkey33[33];
|
||||||
@@ -50,7 +45,6 @@ int8_t updateStakedNotary() {
|
|||||||
NOTARY_ADDRESS.assign(Raddress);
|
NOTARY_ADDRESS.assign(Raddress);
|
||||||
return(StakedNotaryID(notaryname,Raddress));
|
return(StakedNotaryID(notaryname,Raddress));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
int8_t StakedNotaryID(std::string ¬aryname, char *Raddress) {
|
int8_t StakedNotaryID(std::string ¬aryname, char *Raddress) {
|
||||||
if ( STAKED_ERA != 0 )
|
if ( STAKED_ERA != 0 )
|
||||||
@@ -160,12 +154,8 @@ void UpdateNotaryAddrs(uint8_t pubkeys[64][33],int8_t numNotaries) {
|
|||||||
// staked era is set.
|
// staked era is set.
|
||||||
pthread_mutex_lock(&staked_mutex);
|
pthread_mutex_lock(&staked_mutex);
|
||||||
for (int i = 0; i<numNotaries; i++) {
|
for (int i = 0; i<numNotaries; i++) {
|
||||||
#ifdef CLI
|
|
||||||
NUM_NOTARIES = 0;
|
|
||||||
#else
|
|
||||||
pubkey2addr((char *)NOTARYADDRS[i],(uint8_t *)pubkeys[i]);
|
pubkey2addr((char *)NOTARYADDRS[i],(uint8_t *)pubkeys[i]);
|
||||||
NUM_NOTARIES = numNotaries;
|
NUM_NOTARIES = numNotaries;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
pthread_mutex_unlock(&staked_mutex);
|
pthread_mutex_unlock(&staked_mutex);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user