Bitcoin ABC
0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
src
bench
data
convert-raw-to-header.py
Go to the documentation of this file.
1
#!/usr/bin/env python3
2
# Copyright (c) 2019 The Bitcoin developers
3
4
import
sys
5
6
7
def
main
(test_name, input_file):
8
with
open(input_file,
"rb"
)
as
f:
9
contents =
f.read
()
10
11
print
(f
"static unsigned const char {test_name}_raw[] = {{"
)
12
print
(
", "
.
join
(f
"0x{x:02x}"
for
x
in
contents))
13
print
(
"};"
)
14
15
16
if
__name__ ==
"__main__"
:
17
if
len
(
sys.argv
) != 3:
18
print
(
"We need additional pylons!"
)
19
sys.exit
(1)
20
21
main
(
sys.argv
[1],
sys.argv
[2])
main
int main(void)
Definition
bench.c:157
GetRand
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
Definition
random.h:85
Generated on Sat Nov 23 2024 02:37:58 for Bitcoin ABC by
1.9.8