333
This commit is contained in:
@@ -44,6 +44,7 @@ komodo_asset WLC 210000000
|
|||||||
komodo_asset KV 1000000
|
komodo_asset KV 1000000
|
||||||
komodo_asset CEAL 366666666
|
komodo_asset CEAL 366666666
|
||||||
komodo_asset MESH 1000007
|
komodo_asset MESH 1000007
|
||||||
|
komodo_asset MNZ 257142858
|
||||||
|
|
||||||
komodo_asset USD
|
komodo_asset USD
|
||||||
komodo_asset EUR
|
komodo_asset EUR
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ echo $pubkey
|
|||||||
./komodod -pubkey=$pubkey -ac_name=KV -ac_supply=1000000 -addnode=78.47.196.146 $1 &
|
./komodod -pubkey=$pubkey -ac_name=KV -ac_supply=1000000 -addnode=78.47.196.146 $1 &
|
||||||
./komodod -pubkey=$pubkey -ac_name=CEAL -ac_supply=366666666 -addnode=78.47.196.146 $1 &
|
./komodod -pubkey=$pubkey -ac_name=CEAL -ac_supply=366666666 -addnode=78.47.196.146 $1 &
|
||||||
./komodod -pubkey=$pubkey -ac_name=MESH -ac_supply=1000007 -addnode=78.47.196.146 $1 &
|
./komodod -pubkey=$pubkey -ac_name=MESH -ac_supply=1000007 -addnode=78.47.196.146 $1 &
|
||||||
|
./komodod -pubkey=$pubkey -ac_name=MNZ -ac_supply=257142858 -addnode=51.15.138.138 $1 &
|
||||||
sleep $delay
|
sleep $delay
|
||||||
|
|
||||||
./komodod -pubkey=$pubkey -ac_name=USD -addnode=78.47.196.146 $1 &
|
./komodod -pubkey=$pubkey -ac_name=USD -addnode=78.47.196.146 $1 &
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ static bool AppInitRPC(int argc, char* argv[])
|
|||||||
// Parameters
|
// Parameters
|
||||||
//
|
//
|
||||||
ParseParameters(argc, argv);
|
ParseParameters(argc, argv);
|
||||||
komodo_args();
|
komodo_args(argv[0]);
|
||||||
if (argc<2 || mapArgs.count("-?") || mapArgs.count("-h") || mapArgs.count("-help") || mapArgs.count("-version")) {
|
if (argc<2 || mapArgs.count("-?") || mapArgs.count("-h") || mapArgs.count("-help") || mapArgs.count("-version")) {
|
||||||
std::string strUsage = _("Komodo RPC client version") + " " + FormatFullVersion() + "\n" + PrivacyInfo();
|
std::string strUsage = _("Komodo RPC client version") + " " + FormatFullVersion() + "\n" + PrivacyInfo();
|
||||||
if (!mapArgs.count("-version")) {
|
if (!mapArgs.count("-version")) {
|
||||||
@@ -196,7 +196,7 @@ UniValue CallRPC(const 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_PORT = port;
|
||||||
// Obtain event base
|
// Obtain event base
|
||||||
raii_event_base base = obtain_event_base();
|
raii_event_base base = obtain_event_base();
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dp
|
|||||||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"KV\",\"pubkey\":\"$pubkey\"}"
|
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"KV\",\"pubkey\":\"$pubkey\"}"
|
||||||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CEAL\",\"pubkey\":\"$pubkey\"}"
|
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CEAL\",\"pubkey\":\"$pubkey\"}"
|
||||||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"MESH\",\"pubkey\":\"$pubkey\"}"
|
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"MESH\",\"pubkey\":\"$pubkey\"}"
|
||||||
|
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"MNZ\",\"pubkey\":\"$pubkey\"}"
|
||||||
|
|
||||||
|
|
||||||
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"USD\",\"pubkey\":\"$pubkey\"}"
|
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"USD\",\"pubkey\":\"$pubkey\"}"
|
||||||
|
|||||||
@@ -49,3 +49,4 @@ echo wlc; fiat/wlc $1 $2 $3 $4
|
|||||||
echo kv; fiat/kv $1 $2 $3 $4
|
echo kv; fiat/kv $1 $2 $3 $4
|
||||||
echo ceal; fiat/ceal $1 $2 $3 $4
|
echo ceal; fiat/ceal $1 $2 $3 $4
|
||||||
echo mesh; fiat/mesh $1 $2 $3 $4
|
echo mesh; fiat/mesh $1 $2 $3 $4
|
||||||
|
echo mnz; fiat/mnz $1 $2 $3 $4
|
||||||
|
|||||||
@@ -126,6 +126,15 @@ static bool HTTPReq_JSONRPC(HTTPRequest* req, const std::string &)
|
|||||||
// singleton request
|
// singleton request
|
||||||
if (valRequest.isObject()) {
|
if (valRequest.isObject()) {
|
||||||
jreq.parse(valRequest);
|
jreq.parse(valRequest);
|
||||||
|
|
||||||
|
if (!RPCAuthorized(authHeader.second)) {
|
||||||
|
LogPrintf("ThreadRPCServer incorrect password attempt from %s\n", req->GetPeer().ToString());
|
||||||
|
MilliSleep(250);
|
||||||
|
|
||||||
|
req->WriteHeader("WWW-Authenticate", WWW_AUTH_HEADER_DATA);
|
||||||
|
req->WriteReply(HTTP_UNAUTHORIZED);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
UniValue result = tableRPC.execute(jreq.strMethod, jreq.params);
|
UniValue result = tableRPC.execute(jreq.strMethod, jreq.params);
|
||||||
|
|
||||||
|
|||||||
@@ -1352,8 +1352,8 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3
|
|||||||
void komodo_passport_iteration()
|
void komodo_passport_iteration()
|
||||||
{
|
{
|
||||||
static long lastpos[34]; static char userpass[33][1024]; static uint32_t lasttime;
|
static long lastpos[34]; static char userpass[33][1024]; static uint32_t lasttime;
|
||||||
int32_t maxseconds = 30;
|
int32_t maxseconds = 10;
|
||||||
FILE *fp; int32_t baseid,n,ht,isrealtime,expired,refid,blocks,longest; struct komodo_state *sp,*refsp; char *retstr,fname[512],*base,symbol[16],dest[16]; uint32_t buf[3],starttime; cJSON *infoobj,*result; uint64_t RTmask = 0;
|
FILE *fp; int32_t baseid,limit,n,ht,isrealtime,expired,refid,blocks,longest; struct komodo_state *sp,*refsp; char *retstr,fname[512],*base,symbol[16],dest[16]; uint32_t buf[3],starttime; cJSON *infoobj,*result; uint64_t RTmask = 0;
|
||||||
//printf("PASSPORT.(%s)\n",ASSETCHAINS_SYMBOL);
|
//printf("PASSPORT.(%s)\n",ASSETCHAINS_SYMBOL);
|
||||||
expired = 0;
|
expired = 0;
|
||||||
while ( KOMODO_INITDONE == 0 )
|
while ( KOMODO_INITDONE == 0 )
|
||||||
@@ -1365,10 +1365,12 @@ void komodo_passport_iteration()
|
|||||||
if ( ASSETCHAINS_SYMBOL[0] == 0 )
|
if ( ASSETCHAINS_SYMBOL[0] == 0 )
|
||||||
{
|
{
|
||||||
refid = 33;
|
refid = 33;
|
||||||
|
limit = 1000000;
|
||||||
jumblr_iteration();
|
jumblr_iteration();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
limit = 10000;
|
||||||
refid = komodo_baseid(ASSETCHAINS_SYMBOL)+1; // illegal base -> baseid.-1 -> 0
|
refid = komodo_baseid(ASSETCHAINS_SYMBOL)+1; // illegal base -> baseid.-1 -> 0
|
||||||
if ( refid == 0 )
|
if ( refid == 0 )
|
||||||
{
|
{
|
||||||
@@ -1382,7 +1384,7 @@ void komodo_passport_iteration()
|
|||||||
return;
|
return;
|
||||||
}*/
|
}*/
|
||||||
starttime = (uint32_t)time(NULL);
|
starttime = (uint32_t)time(NULL);
|
||||||
if ( starttime == lasttime )
|
if ( 0 && starttime == lasttime )
|
||||||
{
|
{
|
||||||
usleep(1000);
|
usleep(1000);
|
||||||
return;
|
return;
|
||||||
@@ -1413,9 +1415,9 @@ void komodo_passport_iteration()
|
|||||||
if ( ASSETCHAINS_SYMBOL[0] != 0 )
|
if ( ASSETCHAINS_SYMBOL[0] != 0 )
|
||||||
printf("%s passport refid.%d %s fname.(%s) base.%s %ld %ld\n",ASSETCHAINS_SYMBOL,refid,symbol,fname,base,ftell(fp),lastpos[baseid]);
|
printf("%s passport refid.%d %s fname.(%s) base.%s %ld %ld\n",ASSETCHAINS_SYMBOL,refid,symbol,fname,base,ftell(fp),lastpos[baseid]);
|
||||||
fseek(fp,lastpos[baseid],SEEK_SET);
|
fseek(fp,lastpos[baseid],SEEK_SET);
|
||||||
while ( komodo_parsestatefile(sp,fp,symbol,dest) >= 0 && n < 1000 )
|
while ( komodo_parsestatefile(sp,fp,symbol,dest) >= 0 && n < limit )
|
||||||
{
|
{
|
||||||
if ( n == 999 )
|
if ( n == limit-1 )
|
||||||
{
|
{
|
||||||
if ( time(NULL) < starttime+maxseconds )
|
if ( time(NULL) < starttime+maxseconds )
|
||||||
n = 0;
|
n = 0;
|
||||||
|
|||||||
@@ -643,6 +643,9 @@ void ReadConfigFile(map<string, string>& mapSettingsRet,
|
|||||||
}
|
}
|
||||||
// If datadir is changed in .conf file:
|
// If datadir is changed in .conf file:
|
||||||
ClearDatadirCache();
|
ClearDatadirCache();
|
||||||
|
extern uint16_t BITCOIND_PORT;
|
||||||
|
BITCOIND_PORT = GetArg("-rpcport",BaseParams().RPCPort());
|
||||||
|
//fprintf(stderr,"from conf file %s RPC %u, used to be %u\n",ASSETCHAINS_SYMBOL,BITCOIND_PORT,BITCOIND_PORT);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
#include "libsnark/common/profiling.hpp"
|
#include "libsnark/common/profiling.hpp"
|
||||||
char ASSETCHAINS_SYMBOL[16];
|
char ASSETCHAINS_SYMBOL[16];
|
||||||
int64_t MAX_MONEY = 200000000 * 100000000LL;
|
int64_t MAX_MONEY = 200000000 * 100000000LL;
|
||||||
|
uint16_t BITCOIND_PORT = 7771;
|
||||||
|
|
||||||
using namespace libzcash;
|
using namespace libzcash;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user