From c1e60aa429b1f48bdd7e654625c24474de6719b5 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 30 Aug 2016 03:40:34 -0300 Subject: [PATCH] test --- gecko/gecko_miner.c | 12 ++++++------ iguana/coins/genltc | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gecko/gecko_miner.c b/gecko/gecko_miner.c index fb01010c6..f77193f93 100755 --- a/gecko/gecko_miner.c +++ b/gecko/gecko_miner.c @@ -336,7 +336,7 @@ int32_t gecko_blocksubmit(struct supernet_info *myinfo,struct iguana_info *btcd, //printf("submit.(%s)\n",blockstr); if ( (peers= virt->peers) == 0 || (numranked= peers->numranked) <= 0 ) { - if ( basilisk_blocksubmit(myinfo,btcd,virt,0,blockstr,hash2,height) < 0 )//(myinfo->numrelays >> 1) ) + if ( basilisk_blocksubmit(myinfo,btcd,virt,0,blockstr,hash2,height) < 0 )//(NUMRELAYS >> 1) ) return(-1); } else // physical node for geckochain @@ -360,26 +360,26 @@ void gecko_miner(struct supernet_info *myinfo,struct iguana_info *btcd,struct ig struct iguana_zblock newblock; uint32_t prevtimestamp,nBits; int64_t reward = 0; int32_t txn_count; char *blockstr,*space[256]; struct gecko_memtx **txptrs; void *ptr; //struct iguana_bundle *bp; #ifndef __APPLE__ int32_t i,gap; - if ( virt->virtualchain == 0 || myinfo->RELAYID < 0 || myinfo->numrelays < 1 ) + if ( virt->virtualchain == 0 || RELAYID < 0 || NUMRELAYS < 1 ) { //printf("skip non-virtual chain.%s\n",virt->symbol); return; } if ( virt->blocks.hwmchain.height < virt->longestchain-1 ) return; - if ( (virt->blocks.hwmchain.height % myinfo->numrelays) != myinfo->RELAYID ) + if ( (virt->blocks.hwmchain.height % NUMRELAYS) != RELAYID ) { - //if ( myinfo->numrelays < 3 ) + //if ( NUMRELAYS < 3 ) // return; gap = (int32_t)(time(NULL) - virt->blocks.hwmchain.RO.timestamp) / 60;//virt->chain->estblocktime; for (i=0; iblocks.hwmchain.height+i) % myinfo->numrelays) == myinfo->RELAYID ) + if ( ((virt->blocks.hwmchain.height+i) % NUMRELAYS) == RELAYID ) break; } if ( i == gap ) return; - printf("backup block generator RELAYID.%d gap.%d ht.%d i.%d num.%d\n",myinfo->RELAYID,gap,virt->blocks.hwmchain.height,i,myinfo->numrelays); + printf("backup block generator RELAYID.%d gap.%d ht.%d i.%d num.%d\n",RELAYID,gap,virt->blocks.hwmchain.height,i,NUMRELAYS); } #endif /*if ( virt->newblockstr != 0 ) diff --git a/iguana/coins/genltc b/iguana/coins/genltc index 457e57e10..f5faec175 100755 --- a/iguana/coins/genltc +++ b/iguana/coins/genltc @@ -1,2 +1,2 @@ -curl --url "http://127.0.0.1:7778" --data "{\"RELAY\":1,\"VALIDATE\":1,\"prefetchlag\":-1,\"poll\":10,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"startpend\":8,\"endpend\":8,\"services\":129,\"maxpeers\":256,\"newcoin\":\"LTC\",\"name\":\"Litecoin\",\"hasheaders\":1,\"useaddmultisig\":0,\"netmagic\":\"fbc0b6db\",\"p2p\":9333,\"rpc\":9332,\"pubval\":48,\"p2shval\":5,\"wifval\":176,\"txfee_satoshis\":\"100000\",\"isPoS\":0,\"minoutput\":10000,\"minconfirms\":2,\"genesishash\":\"12a765e31ffd4059bada1e25190f6e98c99d9714d334efa41a195a7e7e04bfe2\",\"genesis\":{\"version\":1,\"timestamp\":1317972665,\"nBits\":\"1e0ffff0\",\"nonce\":2084524493,\"merkle_root\":\"97ddfbbae6be97fd6cdf3e7ca13232a3afff2353e29badfab7f73011edd4ced9\"},\"alertpubkey\":\"040184710fa689ad5023690c80f3a49c8f13f8d45b8c857fbcbc8bc4a8e4d3eb4b10f4d4604fa08dce601aaf0f470216fe1b51850b4acf21b179c45070ac7b03a9\",\"protover\":70002}" +curl --url "http://127.0.0.1:7778" --data "{\"RELAY\":1,\"VALIDATE\":1,\"prefetchlag\":-1,\"poll\":10,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"startpend\":8,\"endpend\":8,\"services\":129,\"maxpeers\":256,\"newcoin\":\"LTC\",\"name\":\"Litecoin\",\"hasheaders\":1,\"useaddmultisig\":0,\"netmagic\":\"fbc0b6db\",\"p2p\":9333,\"rpc\":9332,\"pubval\":48,\"p2shval\":5,\"wifval\":176,\"txfee_satoshis\":\"100000\",\"isPoS\":0,\"minoutput\":10000,\"minconfirms\":2,\"genesishash\":\"12a765e31ffd4059bada1e25190f6e98c99d9714d334efa41a195a7e7e04bfe2\",\"genesis\":{\"hashalgo\":\"scrypt\",\"version\":1,\"timestamp\":1317972665,\"nBits\":\"1e0ffff0\",\"nonce\":2084524493,\"merkle_root\":\"97ddfbbae6be97fd6cdf3e7ca13232a3afff2353e29badfab7f73011edd4ced9\"},\"alertpubkey\":\"040184710fa689ad5023690c80f3a49c8f13f8d45b8c857fbcbc8bc4a8e4d3eb4b10f4d4604fa08dce601aaf0f470216fe1b51850b4acf21b179c45070ac7b03a9\",\"protover\":70002}"