Skip to content

Commit 19f3ee9

Browse files
committed
Avoid boost dynamic_bitset in rest_getutxos
1 parent 1bda012 commit 19f3ee9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/rest.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include "version.h"
1818

1919
#include <boost/algorithm/string.hpp>
20-
#include <boost/dynamic_bitset.hpp>
2120

2221
#include <univalue.h>
2322

@@ -497,7 +496,8 @@ static bool rest_getutxos(HTTPRequest* req, const std::string& strURIPart)
497496
std::vector<unsigned char> bitmap;
498497
std::vector<CCoin> outs;
499498
std::string bitmapStringRepresentation;
500-
boost::dynamic_bitset<unsigned char> hits(vOutPoints.size());
499+
std::vector<bool> hits;
500+
bitmap.resize((vOutPoints.size() + 7) / 8);
501501
{
502502
LOCK2(cs_main, mempool.cs);
503503

@@ -520,9 +520,9 @@ static bool rest_getutxos(HTTPRequest* req, const std::string& strURIPart)
520520

521521
hits.push_back(hit);
522522
bitmapStringRepresentation.append(hit ? "1" : "0"); // form a binary string representation (human-readable for json output)
523+
bitmap[i / 8] |= ((uint8_t)hit) << (i % 8);
523524
}
524525
}
525-
boost::to_block_range(hits, std::back_inserter(bitmap));
526526

527527
switch (rf) {
528528
case RF_BINARY: {

0 commit comments

Comments
 (0)