Fix memory leak in large tx benchmark
This commit is contained in:
parent
cfd806e161
commit
c2e092f29e
|
@ -231,6 +231,7 @@ processblock:
|
||||||
}
|
}
|
||||||
|
|
||||||
double ret = timer_stop();
|
double ret = timer_stop();
|
||||||
|
delete pblocktemplate;
|
||||||
if (!testValidate)
|
if (!testValidate)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
@ -238,7 +239,6 @@ processblock:
|
||||||
mempool.addUnchecked(hash, CTxMemPoolEntry(mtx2, 11, GetTime(), 111.0, 11));
|
mempool.addUnchecked(hash, CTxMemPoolEntry(mtx2, 11, GetTime(), 111.0, 11));
|
||||||
|
|
||||||
// 4) Call CreateNewBlock (which itself calls TestBlockValidity)
|
// 4) Call CreateNewBlock (which itself calls TestBlockValidity)
|
||||||
delete pblocktemplate;
|
|
||||||
pblocktemplate = CreateNewBlock(scriptDummy);
|
pblocktemplate = CreateNewBlock(scriptDummy);
|
||||||
pblock = &pblocktemplate->block;
|
pblock = &pblocktemplate->block;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue