diff --git a/src/miner.cpp b/src/miner.cpp index de641d5c8..74bbbefc2 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -425,10 +425,10 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn) if ( ASSETCHAINS_SYMBOL[0] != 0 && ASSETCHAINS_OVERRIDE_PUBKEY33[0] != 0 && ASSETCHAINS_COMMISSION != 0 && (commission= komodo_commission(pblocktemplate->block)) != 0 ) { int32_t i; uint8_t *ptr; - txNew.vout.resize(2); - txNew.vout[1].nValue = commission; - txNew.vout[1].scriptPubKey.resize(35); - ptr = (uint8_t *)txNew.vout[1].scriptPubKey.data(); + pblock->vtx[0].resize(2); + pblock->vtx[0].vout[1].nValue = commission; + pblock->vtx[0].vout[1].scriptPubKey.resize(35); + ptr = (uint8_t *)pblock->vtx[0].vout[1].scriptPubKey.data(); ptr[0] = 33; for (i=0; i<33; i++) ptr[i+1] = ASSETCHAINS_OVERRIDE_PUBKEY33[i];