remove pointless things
This commit is contained in:
@@ -123,9 +123,8 @@ TESTS =
|
||||
bin_PROGRAMS += komodod
|
||||
#endif
|
||||
|
||||
# komodo-tx
|
||||
if BUILD_BITCOIN_UTILS
|
||||
bin_PROGRAMS += komodo-cli
|
||||
bin_PROGRAMS += komodo-cli komodo-tx
|
||||
endif
|
||||
if ENABLE_WALLET
|
||||
bin_PROGRAMS += wallet-utility
|
||||
@@ -205,7 +204,7 @@ BITCOIN_CORE_H = \
|
||||
mruset.h \
|
||||
net.h \
|
||||
netbase.h \
|
||||
notaries_staked.h \
|
||||
notaries_staked.h \
|
||||
noui.h \
|
||||
paymentdisclosure.h \
|
||||
paymentdisclosuredb.h \
|
||||
@@ -313,7 +312,7 @@ libbitcoin_server_a_SOURCES = \
|
||||
chain.cpp \
|
||||
checkpoints.cpp \
|
||||
crosschain.cpp \
|
||||
crosschain_authority.cpp \
|
||||
crosschain_authority.cpp \
|
||||
crypto/haraka.h \
|
||||
crypto/haraka_portable.h \
|
||||
crypto/verus_hash.h \
|
||||
@@ -328,7 +327,7 @@ libbitcoin_server_a_SOURCES = \
|
||||
metrics.h \
|
||||
miner.cpp \
|
||||
net.cpp \
|
||||
notaries_staked.cpp \
|
||||
notaries_staked.cpp \
|
||||
noui.cpp \
|
||||
notarisationdb.cpp \
|
||||
paymentdisclosure.cpp \
|
||||
@@ -620,8 +619,8 @@ komodo_cli_LDADD = \
|
||||
$(EVENT_LIBS) \
|
||||
$(LIBZCASH) \
|
||||
$(LIBBITCOIN_CRYPTO) \
|
||||
$(LIBVERUS_CRYPTO) \
|
||||
$(LIBVERUS_PORTABLE_CRYPTO) \
|
||||
$(LIBVERUS_CRYPTO) \
|
||||
$(LIBVERUS_PORTABLE_CRYPTO) \
|
||||
$(LIBZCASH_LIBS)
|
||||
|
||||
if ENABLE_WALLET
|
||||
@@ -629,8 +628,8 @@ wallet_utility_LDADD = \
|
||||
libbitcoin_wallet.a \
|
||||
$(LIBBITCOIN_COMMON) \
|
||||
$(LIBBITCOIN_CRYPTO) \
|
||||
$(LIBVERUS_CRYPTO) \
|
||||
$(LIBVERUS_PORTABLE_CRYPTO) \
|
||||
$(LIBVERUS_CRYPTO) \
|
||||
$(LIBVERUS_PORTABLE_CRYPTO) \
|
||||
$(LIBSECP256K1) \
|
||||
$(LIBBITCOIN_UTIL) \
|
||||
$(BOOST_LIBS) \
|
||||
@@ -639,7 +638,7 @@ wallet_utility_LDADD = \
|
||||
$(LIBZCASH) \
|
||||
$(LIBSNARK) \
|
||||
$(LIBZCASH_LIBS)\
|
||||
$(LIBCRYPTOCONDITIONS)
|
||||
$(LIBCRYPTOCONDITIONS)
|
||||
endif
|
||||
|
||||
# zcash-tx binary #
|
||||
@@ -679,7 +678,7 @@ libzcash_a_SOURCES = \
|
||||
zcash/Note.cpp \
|
||||
zcash/prf.cpp \
|
||||
zcash/util.cpp \
|
||||
zcash/zip32.cpp \
|
||||
zcash/zip32.cpp \
|
||||
zcash/circuit/commitment.tcc \
|
||||
zcash/circuit/gadget.tcc \
|
||||
zcash/circuit/merkle.tcc \
|
||||
|
||||
@@ -136,51 +136,42 @@
|
||||
"ac_reward": "100000000"
|
||||
},
|
||||
{
|
||||
"ac_name": "CFEKED",
|
||||
"ac_supply": "1000",
|
||||
"ac_name": "SEC",
|
||||
"ac_supply": "1000000000",
|
||||
"ac_cc": "333"
|
||||
},
|
||||
{
|
||||
"ac_name": "CCL",
|
||||
"ac_supply": "200000000",
|
||||
"ac_end": "1",
|
||||
"ac_reward": "1",
|
||||
"ac_staked": "1",
|
||||
"ac_cc": "102",
|
||||
"ac_cc": "2",
|
||||
"addressindex": "1",
|
||||
"spentindex": "1",
|
||||
"addnode": [
|
||||
"195.201.137.5",
|
||||
"195.201.20.230"
|
||||
"142.93.136.89",
|
||||
"195.201.22.89"
|
||||
]
|
||||
},
|
||||
{
|
||||
"ac_name": "CFEKING",
|
||||
"ac_supply": "1000",
|
||||
"ac_end": "1",
|
||||
"ac_reward": "1",
|
||||
"ac_staked": "1",
|
||||
"ac_cc": "102",
|
||||
"ac_name": "PIRATE",
|
||||
"ac_supply": "0",
|
||||
"ac_reward": "25600000000",
|
||||
"ac_halving": "77777",
|
||||
"ac_private": "1",
|
||||
"addnode": [
|
||||
"195.201.137.5",
|
||||
"195.201.20.230"
|
||||
"136.243.102.225"
|
||||
]
|
||||
},
|
||||
{
|
||||
"ac_name": "CFEKLF",
|
||||
"ac_supply": "1000",
|
||||
"ac_end": "1",
|
||||
"ac_reward": "1",
|
||||
"ac_staked": "1",
|
||||
"ac_cc": "102",
|
||||
"ac_name": "MGNX",
|
||||
"ac_supply": "12465003",
|
||||
"ac_staked": "90",
|
||||
"ac_reward": "2000000000",
|
||||
"ac_halving": "525960",
|
||||
"ac_cc": "2",
|
||||
"ac_end": "2629800",
|
||||
"addnode": [
|
||||
"195.201.137.5",
|
||||
"195.201.20.230"
|
||||
]
|
||||
},
|
||||
{
|
||||
"ac_name": "CFEKMLT",
|
||||
"ac_supply": "1000",
|
||||
"ac_end": "1",
|
||||
"ac_reward": "1",
|
||||
"ac_staked": "1",
|
||||
"ac_cc": "102",
|
||||
"addnode": [
|
||||
"195.201.137.5",
|
||||
"195.201.20.230"
|
||||
"142.93.27.180"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#include "util.h"
|
||||
#include "utilstrencodings.h"
|
||||
|
||||
|
||||
#include <boost/filesystem/operations.hpp>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
@@ -1213,9 +1213,6 @@ int64_t DicePlanFunds(uint64_t &entropyval,uint256 &entropytxid,uint64_t refsbit
|
||||
} else {
|
||||
return(0);
|
||||
}
|
||||
fprintf(stderr,"numentropy tx %d: %.8f\n",n,(double)totalinputs/COIN);
|
||||
entropytxs = n;
|
||||
return(totalinputs);
|
||||
}
|
||||
|
||||
bool DicePlanExists(CScript &fundingPubKey,uint256 &fundingtxid,struct CCcontract_info *cp,uint64_t refsbits,CPubKey dicepk,int64_t &minbet,int64_t &maxbet,int64_t &maxodds,int64_t &timeoutblocks)
|
||||
@@ -1419,7 +1416,7 @@ std::string DiceBet(uint64_t txfee,char *planstr,uint256 fundingtxid,int64_t bet
|
||||
CScript fundingPubKey; CPubKey mypk,dicepk; uint64_t sbits,entropyval,entropyval2; int64_t funding,minbet,maxbet,maxodds,timeoutblocks; uint256 entropytxid,entropytxid2,entropy,hentropy; struct CCcontract_info *cp,C;
|
||||
if ( bet < 0 )
|
||||
{
|
||||
CCerror = "bet must be positive";
|
||||
CCerror = "Diceinit error in bet, is your transaction confirmed?";
|
||||
return("");
|
||||
}
|
||||
if ( odds < 2 || odds > 9999 )
|
||||
@@ -1756,7 +1753,8 @@ double DiceStatus(uint64_t txfee,char *planstr,uint256 fundingtxid,uint256 bettx
|
||||
CScript fundingPubKey,scriptPubKey; CTransaction spenttx,betTx,entropyTx; uint256 hentropyproof,entropyused,hash,proof,txid,hashBlock,spenttxid,bettorentropy; CPubKey mypk,dicepk,fundingpk; struct CCcontract_info *cp,C; int32_t i,entropyvout,flag,win,num,loss,duplicate=0,result,iswin,vout,n=0; int64_t minbet,maxbet,maxodds,timeoutblocks,sum=0; uint64_t sbits,refsbits; char coinaddr[64]; std::string res; uint8_t funcid;
|
||||
if ( (cp= Diceinit(fundingPubKey,fundingtxid,&C,planstr,txfee,mypk,dicepk,refsbits,minbet,maxbet,maxodds,timeoutblocks)) == 0 )
|
||||
{
|
||||
CCerror = "Diceinit error in status";
|
||||
CCerror = "Diceinit error in status, is your transaction confirmed?";
|
||||
fprintf(stderr,"%s\n", CCerror.c_str() );
|
||||
return(0.);
|
||||
}
|
||||
win = loss = 0;
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include "version.h"
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Serialisation boilerplate
|
||||
*/
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
#include "zcash/IncrementalMerkleTree.hpp"
|
||||
//#include "veruslaunch.h"
|
||||
|
||||
/**
|
||||
/**
|
||||
* Pruned version of CTransaction: only retains metadata and unspent transaction outputs
|
||||
*
|
||||
* Serialized format:
|
||||
@@ -443,7 +443,7 @@ public:
|
||||
|
||||
class CCoinsViewCache;
|
||||
|
||||
/**
|
||||
/**
|
||||
* A reference to a mutable cache entry. Encapsulating it allows us to run
|
||||
* cleanup code after the modification is finished, and keeping track of
|
||||
* concurrent modifications.
|
||||
@@ -503,7 +503,7 @@ protected:
|
||||
|
||||
/**
|
||||
* Make mutable so that we can "fill the cache" even from Get-methods
|
||||
* declared as "const".
|
||||
* declared as "const".
|
||||
*/
|
||||
mutable uint256 hashBlock;
|
||||
mutable CCoinsMap cacheCoins;
|
||||
@@ -579,7 +579,7 @@ public:
|
||||
//! Calculate the size of the cache (in bytes)
|
||||
size_t DynamicMemoryUsage() const;
|
||||
|
||||
/**
|
||||
/**
|
||||
* Amount of bitcoins coming in to a transaction
|
||||
* Note that lightweight clients may not know anything besides the hash of previous transactions,
|
||||
* so may not be able to calculate this.
|
||||
|
||||
@@ -1536,7 +1536,7 @@ uint32_t komodo_stake(int32_t validateflag,arith_uint256 bnTarget,int32_t nHeigh
|
||||
int32_t komodo_is_PoSblock(int32_t slowflag,int32_t height,CBlock *pblock,arith_uint256 bnTarget,arith_uint256 bhash)
|
||||
{
|
||||
CBlockIndex *previndex,*pindex; char voutaddr[64],destaddr[64]; uint256 txid; uint32_t txtime,prevtime=0; int32_t vout,PoSperc,txn_count,eligible=0,isPoS = 0,segid; uint64_t value; CTxDestination voutaddress; arith_uint256 POWTarget;
|
||||
if ( ASSETCHAINS_STAKED == 100 && height <= 100 )
|
||||
if ( ASSETCHAINS_STAKED == 100 && height <= 10 )
|
||||
return(1);
|
||||
BlockMap::const_iterator it = mapBlockIndex.find(pblock->GetHash());
|
||||
pindex = it != mapBlockIndex.end() ? it->second : NULL;
|
||||
@@ -2194,10 +2194,10 @@ int32_t komodo_checkPOW(int32_t slowflag,CBlock *pblock,int32_t height)
|
||||
}
|
||||
// Check min sigs.
|
||||
int8_t numSN = 0; uint8_t notarypubkeys[64][33] = {0};
|
||||
numSN = komodo_notaries(notarypubkeys, height, pblock->nTime)
|
||||
if ( pblock->vtx[1].vin.size() < numSN/5) )
|
||||
numSN = komodo_notaries(notarypubkeys, height, pblock->nTime);
|
||||
if ( pblock->vtx[1].vin.size() < numSN/5 )
|
||||
{
|
||||
fprintf(stderr, "ht.%i does not meet minsigs.%i sigs.%li\n",height,numSN/5),pblock->vtx[1].vin.size());
|
||||
fprintf(stderr, "ht.%i does not meet minsigs.%i sigs.%li\n",height,numSN/5,pblock->vtx[1].vin.size());
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1690,7 +1690,7 @@ void komodo_args(char *argv0)
|
||||
IS_KOMODO_NOTARY = 1;
|
||||
KOMODO_MININGTHREADS = 1;
|
||||
mapArgs ["-genproclimit"] = itostr(KOMODO_MININGTHREADS);
|
||||
IS_STAKED_NOTARY = -1;
|
||||
IS_STAKED_NOTARY = -1;
|
||||
fprintf(stderr,"running as notary.%d %s\n",i,Notaries_elected1[i][0]);
|
||||
break;
|
||||
}
|
||||
@@ -1723,7 +1723,7 @@ void komodo_args(char *argv0)
|
||||
{
|
||||
printf("KOMODO_REWIND %d\n",KOMODO_REWIND);
|
||||
}
|
||||
if ( name.c_str()[0] != 0 )
|
||||
if ( name.c_str()[0] != 0 )
|
||||
{
|
||||
std::string selectedAlgo = GetArg("-ac_algo", std::string(ASSETCHAINS_ALGORITHMS[0]));
|
||||
|
||||
@@ -1897,10 +1897,10 @@ void komodo_args(char *argv0)
|
||||
ASSETCHAINS_COMMISSION = 53846154; // maps to 35%
|
||||
printf("ASSETCHAINS_COMMISSION defaulted to 35%% when founders reward active\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("ASSETCHAINS_FOUNDERS_REWARD set to %ld\n", ASSETCHAINS_FOUNDERS_REWARD);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("ASSETCHAINS_FOUNDERS_REWARD set to %ld\n", ASSETCHAINS_FOUNDERS_REWARD);
|
||||
}
|
||||
/*else if ( ASSETCHAINS_SELFIMPORT.size() == 0 )
|
||||
{
|
||||
//ASSETCHAINS_OVERRIDE_PUBKEY.clear();
|
||||
|
||||
45
src/main.cpp
45
src/main.cpp
@@ -19,7 +19,6 @@
|
||||
******************************************************************************/
|
||||
|
||||
#include "main.h"
|
||||
#include "notaries_staked.h"
|
||||
#include "sodium.h"
|
||||
|
||||
#include "addrman.h"
|
||||
@@ -1267,35 +1266,23 @@ extern uint8_t NUM_NOTARIES;
|
||||
|
||||
int32_t komodo_isnotaryvout(char *coinaddr) // from ac_private chains only
|
||||
{
|
||||
if ( is_STAKED(ASSETCHAINS_SYMBOL) != 0 )
|
||||
{
|
||||
if ( NOTARYADDRS[0][0] != 0 && NUM_NOTARIES != 0 )
|
||||
{
|
||||
for (int32_t i=0; i<=NUM_NOTARIES; i++)
|
||||
if ( strcmp(coinaddr,NOTARYADDRS[i]) == 0 )
|
||||
return(1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
static int32_t didinit; static char notaryaddrs[sizeof(Notaries_elected1)/sizeof(*Notaries_elected1) + 1][64];
|
||||
int32_t i;
|
||||
if ( didinit == 0 )
|
||||
{
|
||||
uint8_t pubkey33[33];
|
||||
for (i=0; i<=sizeof(Notaries_elected1)/sizeof(*Notaries_elected1); i++)
|
||||
{
|
||||
if ( i < sizeof(Notaries_elected1)/sizeof(*Notaries_elected1) )
|
||||
decode_hex(pubkey33,33,(char *)Notaries_elected1[i][1]);
|
||||
else decode_hex(pubkey33,33,(char *)CRYPTO777_PUBSECPSTR);
|
||||
pubkey2addr((char *)notaryaddrs[i],(uint8_t *)pubkey33);
|
||||
}
|
||||
didinit = 1;
|
||||
}
|
||||
for (i=0; i<=sizeof(Notaries_elected1)/sizeof(*Notaries_elected1); i++)
|
||||
if ( strcmp(coinaddr,notaryaddrs[i]) == 0 )
|
||||
return(1);
|
||||
static int32_t didinit; static char notaryaddrs[sizeof(Notaries_elected1)/sizeof(*Notaries_elected1) + 1][64];
|
||||
int32_t i;
|
||||
if ( didinit == 0 )
|
||||
{
|
||||
uint8_t pubkey33[33];
|
||||
for (i=0; i<=sizeof(Notaries_elected1)/sizeof(*Notaries_elected1); i++)
|
||||
{
|
||||
if ( i < sizeof(Notaries_elected1)/sizeof(*Notaries_elected1) )
|
||||
decode_hex(pubkey33,33,(char *)Notaries_elected1[i][1]);
|
||||
else decode_hex(pubkey33,33,(char *)CRYPTO777_PUBSECPSTR);
|
||||
pubkey2addr((char *)notaryaddrs[i],(uint8_t *)pubkey33);
|
||||
}
|
||||
didinit = 1;
|
||||
}
|
||||
for (i=0; i<=sizeof(Notaries_elected1)/sizeof(*Notaries_elected1); i++)
|
||||
if ( strcmp(coinaddr,notaryaddrs[i]) == 0 )
|
||||
return(1);
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -253,7 +253,7 @@ CBlockTemplate* CreateNewBlock(CPubKey _pk,const CScript& _scriptPubKeyIn, int32
|
||||
if ( ASSETCHAINS_NOTARY_PAY[0] != 0 )
|
||||
{
|
||||
// Only use speical miner for notary pay chains.
|
||||
numSN = komodo_notaries(notarypubkeys, nHeight, pblock->nTime)
|
||||
numSN = komodo_notaries(notarypubkeys, nHeight, pblock->nTime);
|
||||
}
|
||||
|
||||
CCoinsViewCache view(pcoinsTip);
|
||||
|
||||
Reference in New Issue
Block a user