Merge branch 'mastertest' into dwy_mitigation
This commit is contained in:
@@ -1,84 +1,58 @@
|
||||
[
|
||||
{
|
||||
"ac_name": "STAKEDB1",
|
||||
"ac_name": "CFEK",
|
||||
"ac_supply": "100000",
|
||||
"ac_reward" : "1000000000",
|
||||
"ac_cc": "667",
|
||||
"ac_reward": "10000000000000",
|
||||
"ac_staked": "51",
|
||||
"ac_cc": "102",
|
||||
"addnode": [
|
||||
"195.201.137.5",
|
||||
"195.201.20.230"
|
||||
]
|
||||
},
|
||||
{
|
||||
"ac_name": "STAKEDW1",
|
||||
"ac_supply": "100000",
|
||||
"ac_reward" : "1000000000",
|
||||
"ac_cc": "667",
|
||||
"ac_name": "CFEKED",
|
||||
"ac_supply": "1000",
|
||||
"ac_end": "1",
|
||||
"ac_reward": "1",
|
||||
"ac_staked": "1",
|
||||
"ac_cc": "102",
|
||||
"addnode": [
|
||||
"195.201.137.5",
|
||||
"195.201.20.230"
|
||||
]
|
||||
},
|
||||
{
|
||||
"ac_name": "STAKEDPERC",
|
||||
"ac_supply": "1000000",
|
||||
"ac_reward" : "1000000000",
|
||||
"ac_cc": "667",
|
||||
"ac_perc": "10000000",
|
||||
"ac_pubkey": "03bd221868abc063b54a3fceafb9898b1931ed767298a17ac0c9923500a7c60e4b",
|
||||
"ac_name": "CFEKING",
|
||||
"ac_supply": "1000",
|
||||
"ac_end": "1",
|
||||
"ac_reward": "1",
|
||||
"ac_staked": "1",
|
||||
"ac_cc": "102",
|
||||
"addnode": [
|
||||
"195.201.137.5",
|
||||
"195.201.20.230"
|
||||
]
|
||||
},
|
||||
{
|
||||
"ac_name": "STAKEDS1",
|
||||
"ac_supply": "1000000",
|
||||
"ac_reward" : "1000000000",
|
||||
"ac_cc": "667",
|
||||
"ac_staked": "10",
|
||||
"ac_name": "CFEKLF",
|
||||
"ac_supply": "1000",
|
||||
"ac_end": "1",
|
||||
"ac_reward": "1",
|
||||
"ac_staked": "1",
|
||||
"ac_cc": "102",
|
||||
"addnode": [
|
||||
"195.201.137.5",
|
||||
"195.201.20.230"
|
||||
]
|
||||
},
|
||||
{
|
||||
"ac_name": "STAKEDS9",
|
||||
"ac_supply": "1000000",
|
||||
"ac_reward" : "1000000000",
|
||||
"ac_cc": "667",
|
||||
"ac_staked": "90",
|
||||
"addnode": [
|
||||
"195.201.137.5",
|
||||
"195.201.20.230"
|
||||
]
|
||||
},
|
||||
{
|
||||
"ac_name": "STAKEDED",
|
||||
"ac_supply": "1072452",
|
||||
"ac_reward" : "1000000000",
|
||||
"ac_cc": "667",
|
||||
"addnode": [
|
||||
"195.201.137.5",
|
||||
"195.201.20.230"
|
||||
]
|
||||
},
|
||||
{
|
||||
"ac_name": "STAKEDPRIV",
|
||||
"ac_supply": "1000000",
|
||||
"ac_reward" : "10000000000",
|
||||
"ac_private": "1",
|
||||
"addnode": [
|
||||
"195.201.137.5",
|
||||
"195.201.20.230"
|
||||
]
|
||||
},
|
||||
{
|
||||
"ac_name": "STAKEDCCP",
|
||||
"ac_supply": "1000000",
|
||||
"ac_reward" : "10000000000",
|
||||
"ac_private": "1",
|
||||
"ac_cc": "667",
|
||||
"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"
|
||||
|
||||
@@ -46,6 +46,7 @@ int COINBASE_MATURITY = _COINBASE_MATURITY;//100;
|
||||
|
||||
int32_t KOMODO_MININGTHREADS = -1,IS_KOMODO_NOTARY,IS_STAKED_NOTARY,ASSETCHAINS_STREAM,USE_EXTERNAL_PUBKEY,KOMODO_CHOSEN_ONE,ASSETCHAINS_SEED,KOMODO_ON_DEMAND,KOMODO_EXTERNAL_NOTARIES,KOMODO_PASSPORT_INITDONE,KOMODO_PAX,KOMODO_EXCHANGEWALLET,KOMODO_REWIND,STAKED_ERA,KOMODO_CONNECTING = -1;
|
||||
int32_t KOMODO_INSYNC,KOMODO_LASTMINED,prevKOMODO_LASTMINED,KOMODO_CCACTIVATE,JUMBLR_PAUSE = 1;
|
||||
|
||||
std::string ASSETCHAINS_OVERRIDE_ADDRESS,NOTARY_ADDRESS,NOTARY_PUBKEY,ASSETCHAINS_NOTARIES,ASSETCHAINS_,ASSETCHAINS_OVERRIDE_PUBKEY,DONATION_PUBKEY,WHITELIST_ADDRESS;
|
||||
uint8_t NOTARY_PUBKEY33[33],ASSETCHAINS_OVERRIDE_PUBKEY33[33],ASSETCHAINS_PUBLIC,ASSETCHAINS_PRIVATE,ASSETCHAINS_TXPOW,NUM_NOTARIES;
|
||||
|
||||
|
||||
17
src/main.cpp
17
src/main.cpp
@@ -1213,6 +1213,23 @@ bool CheckTransactionWithoutProofVerification(const CTransaction& tx, CValidatio
|
||||
REJECT_INVALID, "bad-txns-txouttotal-toolarge");
|
||||
}
|
||||
}
|
||||
if ( ASSETCHAINS_TXPOW != 0 && tx.vjoinsplit.size() == 0 )
|
||||
{
|
||||
// genesis coinbase 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
|
||||
uint256 txid = tx.GetHash();
|
||||
if ( ((ASSETCHAINS_TXPOW & 2) != 0 && iscoinbase != 0) || ((ASSETCHAINS_TXPOW & 1) != 0 && iscoinbase == 0) )
|
||||
{
|
||||
if ( ((uint8_t *)&txid)[0] != 0 || ((uint8_t *)&txid)[31] != 0 )
|
||||
{
|
||||
uint256 genesistxid = uint256S("4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b");
|
||||
if ( txid != genesistxid )
|
||||
{
|
||||
fprintf(stderr,"private chain iscoinbase.%d invalid txpow.%d txid.%s\n",iscoinbase,ASSETCHAINS_TXPOW,txid.GetHex().c_str());
|
||||
return state.DoS(100, error("CheckTransaction(): this is a txpow chain, must have 0x00 ends"),REJECT_INVALID, "bad-txns-actxpow-chain");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( ASSETCHAINS_TXPOW != 0 && tx.vjoinsplit.size() == 0 )
|
||||
{
|
||||
|
||||
@@ -5067,33 +5067,6 @@ UniValue CCaddress(struct CCcontract_info *cp,char *name,std::vector<unsigned ch
|
||||
return(result);
|
||||
}
|
||||
|
||||
UniValue channelsaddress(const UniValue& params, bool fHelp)
|
||||
{
|
||||
UniValue result(UniValue::VOBJ); struct CCcontract_info *cp,C; std::vector<unsigned char> destpubkey; CPubKey pk,pk2; char destaddr[64];
|
||||
cp = CCinit(&C,EVAL_CHANNELS);
|
||||
if ( fHelp || params.size() != 1 )
|
||||
throw runtime_error("channelsaddress destpubkey\n");
|
||||
if ( ensure_CCrequirements() < 0 )
|
||||
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
||||
destpubkey = ParseHex(params[0].get_str().c_str());
|
||||
pk = pubkey2pk(Mypubkey());
|
||||
pk2 = pubkey2pk(destpubkey);
|
||||
result = CCaddress(cp,(char *)"Channels",destpubkey);
|
||||
result.push_back(Pair("otherpubkey", params[0].get_str()));
|
||||
GetCCaddress1of2(cp,destaddr,pk,pk2);
|
||||
result.push_back(Pair("channeladdress",destaddr));
|
||||
if ( 0 )
|
||||
{
|
||||
int32_t i;
|
||||
for (i=0; i<100; i++)
|
||||
{
|
||||
GetCCaddress1of2(cp,destaddr,pk,pk2);
|
||||
fprintf(stderr,"i.%d %s\n",i,destaddr);
|
||||
}
|
||||
}
|
||||
return(result);
|
||||
}
|
||||
|
||||
bool pubkey2addr(char *destaddr,uint8_t *pubkey33);
|
||||
extern int32_t IS_KOMODO_NOTARY,IS_STAKED_NOTARY,USE_EXTERNAL_PUBKEY;
|
||||
extern uint8_t NOTARY_PUBKEY33[];
|
||||
@@ -5166,6 +5139,34 @@ UniValue setpubkey(const UniValue& params, bool fHelp)
|
||||
return result;
|
||||
}
|
||||
|
||||
UniValue channelsaddress(const UniValue& params, bool fHelp)
|
||||
{
|
||||
UniValue result(UniValue::VOBJ); struct CCcontract_info *cp,C; std::vector<unsigned char> destpubkey; CPubKey pk,pk2; char destaddr[64];
|
||||
cp = CCinit(&C,EVAL_CHANNELS);
|
||||
if ( fHelp || params.size() != 1 )
|
||||
throw runtime_error("channelsaddress destpubkey\n");
|
||||
if ( ensure_CCrequirements() < 0 )
|
||||
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
||||
destpubkey = ParseHex(params[0].get_str().c_str());
|
||||
pk = pubkey2pk(Mypubkey());
|
||||
pk2 = pubkey2pk(destpubkey);
|
||||
result = CCaddress(cp,(char *)"Channels",destpubkey);
|
||||
result.push_back(Pair("otherpubkey", params[0].get_str()));
|
||||
GetCCaddress1of2(cp,destaddr,pk,pk2);
|
||||
result.push_back(Pair("channeladdress",destaddr));
|
||||
if ( 0 )
|
||||
{
|
||||
int32_t i;
|
||||
for (i=0; i<100; i++)
|
||||
{
|
||||
GetCCaddress1of2(cp,destaddr,pk,pk2);
|
||||
fprintf(stderr,"i.%d %s\n",i,destaddr);
|
||||
}
|
||||
}
|
||||
return(result);
|
||||
}
|
||||
|
||||
|
||||
UniValue oraclesaddress(const UniValue& params, bool fHelp)
|
||||
{
|
||||
struct CCcontract_info *cp,C; std::vector<unsigned char> pubkey;
|
||||
|
||||
Reference in New Issue
Block a user