mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 15:19:07 +01:00
refactor: extract STATIC_SIZE constant to prevector
Co-authored-by: Anthony Towns <aj@erisian.com.au>
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include <key.h>
|
||||
#include <prevector.h>
|
||||
#include <random.h>
|
||||
#include <script/script.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
@@ -16,7 +17,6 @@
|
||||
|
||||
static const size_t BATCHES = 101;
|
||||
static const size_t BATCH_SIZE = 30;
|
||||
static const int PREVECTOR_SIZE = 28;
|
||||
static const unsigned int QUEUE_BATCH_SIZE = 128;
|
||||
|
||||
// This Benchmark tests the CheckQueue with a slightly realistic workload,
|
||||
@@ -30,9 +30,9 @@ static void CCheckQueueSpeedPrevectorJob(benchmark::Bench& bench)
|
||||
ECC_Context ecc_context{};
|
||||
|
||||
struct PrevectorJob {
|
||||
prevector<PREVECTOR_SIZE, uint8_t> p;
|
||||
prevector<CScriptBase::STATIC_SIZE, uint8_t> p;
|
||||
explicit PrevectorJob(FastRandomContext& insecure_rand){
|
||||
p.resize(insecure_rand.randrange(PREVECTOR_SIZE*2));
|
||||
p.resize(insecure_rand.randrange(CScriptBase::STATIC_SIZE * 2));
|
||||
}
|
||||
std::optional<int> operator()()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user