diff --git a/src/bench/rpc_mempool.cpp b/src/bench/rpc_mempool.cpp --- a/src/bench/rpc_mempool.cpp +++ b/src/bench/rpc_mempool.cpp @@ -25,13 +25,18 @@ CTxMemPool pool; LOCK2(cs_main, pool.cs); - for (int i = 0; i < 1000; ++i) { + for (int i = 0; i < 10000; i++) { CMutableTransaction tx = CMutableTransaction(); - tx.vin.resize(1); - tx.vin[0].scriptSig = CScript() << OP_1; - tx.vout.resize(1); - tx.vout[0].scriptPubKey = CScript() << OP_1 << OP_EQUAL; - tx.vout[0].nValue = i * COIN; + tx.vin.resize(100); + for (int j = 0; j < 100; j++) { + tx.vin[j].scriptSig = CScript() << OP_1; + } + + tx.vout.resize(100); + for (int j = 0; j < 100; j++) { + tx.vout[j].scriptPubKey = CScript() << OP_1 << OP_EQUAL; + tx.vout[j].nValue = i * COIN; + } const CTransactionRef tx_r{MakeTransactionRef(tx)}; AddTx(tx_r, /* fee */ i * COIN, pool); } @@ -41,4 +46,4 @@ } } -BENCHMARK(RpcMempool, 40); +BENCHMARK(RpcMempool, 3);