Skip to content

Commit b7155a9

Browse files
committed
uint256->arith_uint256 blob256->uint256
Introduce new opaque implementation of `uint256`, move old "arithmetic" implementation to `arith_uint256.
1 parent f72cd61 commit b7155a9

File tree

7 files changed

+981
-706
lines changed

7 files changed

+981
-706
lines changed

src/Makefile.am

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,12 @@ BITCOIN_CORE_H = \
7474
alert.h \
7575
allocators.h \
7676
amount.h \
77+
arith_uint256.h \
7778
base58.h \
7879
bloom.h \
7980
chain.h \
80-
chainparams.h \
8181
chainparamsbase.h \
82+
chainparams.h \
8283
chainparamsseeds.h \
8384
checkpoints.h \
8485
checkqueue.h \
@@ -87,8 +88,6 @@ BITCOIN_CORE_H = \
8788
coins.h \
8889
compat.h \
8990
compressor.h \
90-
primitives/block.h \
91-
primitives/transaction.h \
9291
core_io.h \
9392
crypter.h \
9493
db.h \
@@ -108,18 +107,20 @@ BITCOIN_CORE_H = \
108107
net.h \
109108
noui.h \
110109
pow.h \
110+
primitives/block.h \
111+
primitives/transaction.h \
111112
protocol.h \
112113
pubkey.h \
113114
random.h \
114115
rpcclient.h \
115116
rpcprotocol.h \
116117
rpcserver.h \
117118
script/interpreter.h \
119+
script/script_error.h \
118120
script/script.h \
119121
script/sigcache.h \
120122
script/sign.h \
121123
script/standard.h \
122-
script/script_error.h \
123124
serialize.h \
124125
streams.h \
125126
sync.h \
@@ -132,13 +133,13 @@ BITCOIN_CORE_H = \
132133
uint256.h \
133134
undo.h \
134135
util.h \
135-
utilstrencodings.h \
136136
utilmoneystr.h \
137+
utilstrencodings.h \
137138
utiltime.h \
138139
version.h \
140+
walletdb.h \
139141
wallet.h \
140142
wallet_ismine.h \
141-
walletdb.h \
142143
compat/sanity.h
143144

144145
JSON_H = \
@@ -261,18 +262,19 @@ libbitcoin_common_a_SOURCES = \
261262
# backward-compatibility objects and their sanity checks are linked.
262263
libbitcoin_util_a_CPPFLAGS = $(BITCOIN_INCLUDES)
263264
libbitcoin_util_a_SOURCES = \
264-
compat/strnlen.cpp \
265-
compat/glibc_sanity.cpp \
266-
compat/glibcxx_sanity.cpp \
265+
arith_uint256.cpp \
267266
chainparamsbase.cpp \
268267
clientversion.cpp \
268+
compat/glibc_sanity.cpp \
269+
compat/glibcxx_sanity.cpp \
270+
compat/strnlen.cpp \
269271
random.cpp \
270272
rpcprotocol.cpp \
271273
sync.cpp \
272274
uint256.cpp \
273275
util.cpp \
274-
utilstrencodings.cpp \
275276
utilmoneystr.cpp \
277+
utilstrencodings.cpp \
276278
utiltime.cpp \
277279
$(BITCOIN_CORE_H)
278280

@@ -352,19 +354,20 @@ bitcoin_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
352354
if BUILD_BITCOIN_LIBS
353355
include_HEADERS = script/bitcoinconsensus.h
354356
libbitcoinconsensus_la_SOURCES = \
355-
primitives/transaction.cpp \
357+
arith_uint256.cpp \
356358
crypto/hmac_sha512.cpp \
359+
crypto/ripemd160.cpp \
357360
crypto/sha1.cpp \
358361
crypto/sha256.cpp \
359362
crypto/sha512.cpp \
360-
crypto/ripemd160.cpp \
361363
eccryptoverify.cpp \
362364
ecwrapper.cpp \
363365
hash.cpp \
366+
primitives/transaction.cpp \
364367
pubkey.cpp \
365-
script/script.cpp \
366-
script/interpreter.cpp \
367368
script/bitcoinconsensus.cpp \
369+
script/interpreter.cpp \
370+
script/script.cpp \
368371
uint256.cpp \
369372
utilstrencodings.cpp
370373

src/Makefile.test.include

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ RAW_TEST_FILES = test/data/alertTests.raw
3333
GENERATED_TEST_FILES = $(JSON_TEST_FILES:.json=.json.h) $(RAW_TEST_FILES:.raw=.raw.h)
3434

3535
BITCOIN_TESTS =\
36+
test/arith_uint256_tests.cpp \
3637
test/bignum.h \
3738
test/alert_tests.cpp \
3839
test/allocator_tests.cpp \
@@ -66,7 +67,6 @@ BITCOIN_TESTS =\
6667
test/test_bitcoin.cpp \
6768
test/timedata_tests.cpp \
6869
test/transaction_tests.cpp \
69-
test/uint256_tests.cpp \
7070
test/univalue_tests.cpp \
7171
test/util_tests.cpp
7272

0 commit comments

Comments
 (0)