Browse Source

Test

z_createrawtransaction
jl777 5 years ago
parent
commit
7ecb2d8b5d
  1. 2
      src/komodo_gateway.h
  2. 6
      src/miner.cpp

2
src/komodo_gateway.h

@ -1555,7 +1555,7 @@ CScript komodo_mineropret(int32_t nHeight)
CScript opret;
if ( Mineropret.size() != 0 )
{
fprintf(stderr,"use Mineropret[%d]\n",(int32_t)Mineropret.size());
//fprintf(stderr,"use Mineropret[%d]\n",(int32_t)Mineropret.size());
return(opret << OP_RETURN << Mineropret);
}
return(opret);

6
src/miner.cpp

@ -726,8 +726,10 @@ CBlockTemplate* CreateNewBlock(CPubKey _pk,const CScript& _scriptPubKeyIn, int32
}
if ( ASSETCHAINS_CBOPRET != 0 )
{
txNew.vout.resize(txNew.vout.size()+1);
txNew.vout[txNew.vout.size()-1].scriptPubKey = komodo_mineropret(nHeight);
int32_t numv = (int32_t)txNew.vout.size();
txNew.vout.resize(numv+1);
txNew.vout[numv].nValue = 0;
txNew.vout[numv].scriptPubKey = komodo_mineropret(nHeight);
printf("autocreate commision/cbopret.%lld vout[%d]\n",(long long)ASSETCHAINS_CBOPRET,(int32_t)txNew.vout.size());
}
pblock->vtx[0] = txNew;

Loading…
Cancel
Save