Browse Source

Test

metaverse
jl777 6 years ago
parent
commit
f31815fc3c
  1. 6
      src/komodo_gateway.h
  2. 6
      src/miner.cpp
  3. 6
      src/wallet/rpcwallet.cpp

6
src/komodo_gateway.h

@ -696,7 +696,7 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block,uint32_t prevtim
overflow = 1;
break;
}
if ( script[0] != 0x6a && val == 0 )
if ( script[0] != 0x6a && val < 5000 )
strangeout++;
total += val;
if ( total < prevtotal || (val != 0 && total == prevtotal) )
@ -722,9 +722,9 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block,uint32_t prevtim
if ( height > KOMODO_NOTARIES_HEIGHT1 )
return(-1);
}
if ( height > 800000 && strangeout != 0 )
if ( strangeout != 0 )
{
fprintf(stderr,"ht.%d strangout.%d\n",height,strangeout);
fprintf(stderr,">>>>>>>>>>>>> ht.%d strangout.%d <<<<<<<<<\n",height,strangeout);
}
}
else

6
src/miner.cpp

@ -482,8 +482,8 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
if ( ASSETCHAINS_SYMBOL[0] == 0 && NOTARY_PUBKEY33[0] != 0 )
{
CMutableTransaction txNotary = CreateNewContextualCMutableTransaction(Params().GetConsensus(), chainActive.Height() + 1);
if ( pblock->nTime < pindexPrev->nTime+60 )
pblock->nTime = pindexPrev->nTime + 65;
if ( pblock->nTime < pindexPrev->nTime+65 )
pblock->nTime = pindexPrev->nTime + 58;//65;
if ( komodo_notaryvin(txNotary,NOTARY_PUBKEY33) > 0 )
{
CAmount txfees = 0;
@ -491,7 +491,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
pblocktemplate->vTxFees.push_back(txfees);
pblocktemplate->vTxSigOps.push_back(GetLegacySigOpCount(txNotary));
nFees += txfees;
fprintf(stderr,"added notaryvin\n");
//fprintf(stderr,"added notaryvin\n");
} else fprintf(stderr,"error adding notaryvin\n");
}
else

6
src/wallet/rpcwallet.cpp

@ -4467,7 +4467,7 @@ uint32_t komodo_stake(int32_t validateflag,arith_uint256 bnTarget,int32_t nHeigh
int32_t komodo_notaryvin(CMutableTransaction &txNew,uint8_t *notarypub33)
{
set<CBitcoinAddress> setAddress; uint8_t *script,utxosig[128]; uint256 utxotxid,revtxid; uint64_t utxovalue; int32_t i,siglen=0,nMinDepth = 1,nMaxDepth = 9999999; vector<COutput> vecOutputs; uint32_t utxovout,eligible,earliest = 0; CScript best_scriptPubKey; bool fNegative,fOverflow;
set<CBitcoinAddress> setAddress; uint8_t *script,utxosig[128]; uint256 utxotxid; uint64_t utxovalue; int32_t i,siglen=0,nMinDepth = 1,nMaxDepth = 9999999; vector<COutput> vecOutputs; uint32_t utxovout,eligible,earliest = 0; CScript best_scriptPubKey; bool fNegative,fOverflow;
bool signSuccess; SignatureData sigdata; uint64_t txfee; uint8_t *ptr;
auto consensusBranchId = CurrentEpochBranchId(chainActive.Height() + 1, Params().GetConsensus());
const CKeyStore& keystore = *pwalletMain;
@ -4533,8 +4533,8 @@ int32_t komodo_notaryvin(CMutableTransaction &txNew,uint8_t *notarypub33)
ptr = (uint8_t *)sigdata.scriptSig.data();
siglen = sigdata.scriptSig.size();
for (i=0; i<siglen; i++)
utxosig[i] = ptr[i], fprintf(stderr,"%02x",ptr[i]);
fprintf(stderr," siglen.%d notaryvin %s/v%d\n",siglen,utxotxid.GetHex().c_str(),utxovout);
utxosig[i] = ptr[i];//, fprintf(stderr,"%02x",ptr[i]);
//fprintf(stderr," siglen.%d notaryvin %s/v%d\n",siglen,utxotxid.GetHex().c_str(),utxovout);
break;
}
}

Loading…
Cancel
Save