From 99fb7ab30a79c9a65abc69e4bf9dc79c3dc28291 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 5 Jul 2018 21:49:51 -1100 Subject: [PATCH 1/5] -print --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 8d1649d3b..d4dfae7ae 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1311,7 +1311,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa uint256 hash = tx.GetHash(); if (pool.exists(hash)) { - fprintf(stderr,"already in mempool\n"); + //fprintf(stderr,"already in mempool\n"); return state.Invalid(false, REJECT_DUPLICATE, "already in mempool"); } From 99fbc8f0c0667c92a90e8fa41928efe7ac9b5404 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 5 Jul 2018 22:01:16 -1100 Subject: [PATCH 2/5] -print --- src/wallet/rpcwallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 53086291a..67bafd32b 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -4605,7 +4605,7 @@ int32_t komodo_staked(CMutableTransaction &txNew,uint32_t nBits,uint32_t *blockt { if ( out.nDepth < nMinDepth || out.nDepth > nMaxDepth ) { - fprintf(stderr,"komodo_staked invalid depth %d\n",(int32_t)out.nDepth); + //fprintf(stderr,"komodo_staked invalid depth %d\n",(int32_t)out.nDepth); continue; } if ( setAddress.size() ) From 1da1d6616340bc1722271b3a8ba770a81c2380de Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 5 Jul 2018 22:01:46 -1100 Subject: [PATCH 3/5] -print --- src/miner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/miner.cpp b/src/miner.cpp index 755b7439e..667e1a3c4 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -432,7 +432,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn,int32_t gpucount) pblocktemplate->vTxSigOps.push_back(GetLegacySigOpCount(txStaked)); nFees += txfees; pblock->nTime = blocktime; - printf("staking PoS ht.%d t%u lag.%u\n",(int32_t)chainActive.Tip()->nHeight+1,blocktime,(uint32_t)(GetAdjustedTime() - (blocktime-13))); + //printf("staking PoS ht.%d t%u lag.%u\n",(int32_t)chainActive.Tip()->nHeight+1,blocktime,(uint32_t)(GetAdjustedTime() - (blocktime-13))); } else return(0); //fprintf(stderr,"no utxos eligible for staking\n"); } From 01e50e731f64dc48cf7c8aa5862aa8b9babb8f26 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 5 Jul 2018 22:02:31 -1100 Subject: [PATCH 4/5] +symbol --- src/miner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/miner.cpp b/src/miner.cpp index 667e1a3c4..dcf22b1bd 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -1009,7 +1009,7 @@ void static BitcoinMiner() uint256 tmp = B.GetHash(); int32_t z; for (z=31; z>=0; z--) fprintf(stderr,"%02x",((uint8_t *)&tmp)[z]); - fprintf(stderr," mined block %d!\n",Mining_height); + fprintf(stderr," mined %s block %d!\n",ASSETCHAINS_SYMBOL,Mining_height); } CValidationState state; if ( !TestBlockValidity(state,B, chainActive.Tip(), true, false)) From d184dbb444a93b791f1323563b36708c521ab81b Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 6 Jul 2018 04:07:07 -1100 Subject: [PATCH 5/5] Hash in utxo for PoS --- src/komodo_bitcoind.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/komodo_bitcoind.h b/src/komodo_bitcoind.h index 113a470c2..4f6b6e2fc 100644 --- a/src/komodo_bitcoind.h +++ b/src/komodo_bitcoind.h @@ -1114,7 +1114,12 @@ uint32_t komodo_stake(int32_t validateflag,arith_uint256 bnTarget,int32_t nHeigh pasthash = pindex->GetBlockHash(); memcpy(hashbuf,&pasthash,sizeof(pasthash)); memcpy(&hashbuf[sizeof(pasthash)],&addrhash,sizeof(addrhash)); - vcalc_sha256(0,(uint8_t *)&hash,hashbuf,(int32_t)sizeof(uint256)*2); + if ( nHeight >= 2000 ) + { + memcpy(&hashbuf[sizeof(pasthash)+sizeof(addrhash)],&txid,sizeof(txid)); + memcpy(&hashbuf[sizeof(pasthash)+sizeof(addrhash)+sizeof(txid)],&vout,sizeof(vout)); + vcalc_sha256(0,(uint8_t *)&hash,hashbuf,(int32_t)sizeof(uint256)*3 + sizeof(vout)); + } else vcalc_sha256(0,(uint8_t *)&hash,hashbuf,(int32_t)sizeof(uint256)*2); //fprintf(stderr,"(%s) vs. (%s) %s %.8f txtime.%u\n",address,destaddr,hash.ToString().c_str(),dstr(value),txtime); for (iter=0; iter<3600; iter++) {