tx-engine 0.7.2__tar.gz → 0.7.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tx_engine-0.7.2 → tx_engine-0.7.3}/Cargo.lock +58 -57
- {tx_engine-0.7.2 → tx_engine-0.7.3}/Cargo.toml +6 -6
- {tx_engine-0.7.2 → tx_engine-0.7.3}/PKG-INFO +1 -1
- {tx_engine-0.7.2 → tx_engine-0.7.3}/docs/Development.md +1 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/docs/Releases.md +2 -1
- tx_engine-0.7.3/python/src/tests/test_woc.py +135 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/tx_engine/interface/woc.py +2 -2
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/interface/uaas_interface.rs +3 -3
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/messages/merkle_block.rs +2 -2
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/peer/peer.rs +3 -3
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/script/interpreter.rs +1 -1
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/util/bits.rs +2 -2
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/util/bloom_filter.rs +1 -1
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/util/rx.rs +1 -1
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/wallet/mnemonic.rs +1 -1
- {tx_engine-0.7.2 → tx_engine-0.7.3}/.github/workflows/CI.yml +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/.github/workflows/on_push.yml +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/.gitignore +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/LICENSE +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/LICENSE-rust-sv +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/README.md +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/docs/README-chain-gang.md +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/docs/Requirements +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/docs/diagrams/keys.png +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/docs/diagrams/keys.puml +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/docs/diagrams/overview.png +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/docs/diagrams/overview.puml +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/docs/diagrams/python_classes.png +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/docs/diagrams/python_classes.puml +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/pyproject.toml +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/lint.sh +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/requirements.txt +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/tests/README.md +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/tests/test_bit_twiddling.py +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/tests/test_bsv.py +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/tests/test_debug.py +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/tests/test_ec.py +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/tests/test_fed.py +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/tests/test_if.py +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/tests/test_interface.py +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/tests/test_op.py +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/tests/test_parse.py +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/tests/test_script.py +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/tests/test_sighash.py +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/tests/test_sign.py +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/tests/test_tx.py +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/tests/test_wallet.py +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/tx_engine/__init__.py +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/tx_engine/engine/__init__.py +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/tx_engine/engine/context.py +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/tx_engine/engine/cryptography_utils.py +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/tx_engine/engine/engine_types.py +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/tx_engine/engine/op_code_names.py +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/tx_engine/engine/op_codes.py +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/tx_engine/engine/util.py +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/tx_engine/interface/__init__.py +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/tx_engine/interface/blockchain_interface.py +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/tx_engine/interface/interface_factory.py +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/tx_engine/interface/mock_interface.py +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/tx_engine/interface/rpc_interface.py +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/tx_engine/interface/verify_script.py +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/tx_engine/interface/woc_interface.py +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/tx_engine/tx/__init__.py +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/src/tx_engine/tx/sighash.py +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/python/tests.sh +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/address/mod.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/interface/blockchain_interface.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/interface/mod.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/interface/test_interface.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/interface/woc_interface.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/lib.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/messages/addr.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/messages/authch.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/messages/block.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/messages/block_header.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/messages/block_locator.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/messages/blocktxn.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/messages/cmpctblock.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/messages/createstrm.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/messages/fee_filter.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/messages/filter_add.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/messages/filter_load.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/messages/getblocktxn.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/messages/headers.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/messages/inv.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/messages/inv_vect.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/messages/message.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/messages/message_header.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/messages/mod.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/messages/node_addr.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/messages/node_addr_ex.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/messages/out_point.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/messages/ping.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/messages/protoconf.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/messages/reject.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/messages/send_cmpct.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/messages/streamack.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/messages/tx.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/messages/tx_in.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/messages/tx_out.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/messages/version.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/network/mod.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/network/network.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/network/seed_iter.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/peer/atomic_reader.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/peer/mod.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/python/mod.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/python/op_code_names.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/python/py_script.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/python/py_stack.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/python/py_tx.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/python/py_wallet.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/script/checker.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/script/mod.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/script/op_codes.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/script/stack.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/transaction/mod.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/transaction/p2pkh.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/transaction/sighash.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/util/errors.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/util/future.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/util/hash160.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/util/hash256.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/util/latch.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/util/mod.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/util/serdes.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/util/sha1.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/util/sha256.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/util/var_int.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/wallet/base58_checksum.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/wallet/extended_key.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/wallet/mod.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/wallet/wallet.rs +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/wallet/wordlists/chinese_simplified.txt +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/wallet/wordlists/chinese_traditional.txt +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/wallet/wordlists/english.txt +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/wallet/wordlists/french.txt +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/wallet/wordlists/italian.txt +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/wallet/wordlists/japanese.txt +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/wallet/wordlists/korean.txt +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/src/wallet/wordlists/spanish.txt +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/tools/README.md +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/tools/dbg.py +0 -0
- {tx_engine-0.7.2 → tx_engine-0.7.3}/tools/generate_key.py +0 -0
|
@@ -28,9 +28,9 @@ dependencies = [
|
|
|
28
28
|
|
|
29
29
|
[[package]]
|
|
30
30
|
name = "async-mutex"
|
|
31
|
-
version = "1.4.
|
|
31
|
+
version = "1.4.1"
|
|
32
32
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
33
|
-
checksum = "
|
|
33
|
+
checksum = "73112ce9e1059d8604242af62c7ec8e5975ac58ac251686c8403b45e8a6fe778"
|
|
34
34
|
dependencies = [
|
|
35
35
|
"event-listener",
|
|
36
36
|
]
|
|
@@ -132,9 +132,9 @@ checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a"
|
|
|
132
132
|
|
|
133
133
|
[[package]]
|
|
134
134
|
name = "cc"
|
|
135
|
-
version = "1.2.
|
|
135
|
+
version = "1.2.20"
|
|
136
136
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
137
|
-
checksum = "
|
|
137
|
+
checksum = "04da6a0d40b948dfc4fa8f5bbf402b0fc1a64a28dbf7d12ffd683550f2c1b63a"
|
|
138
138
|
dependencies = [
|
|
139
139
|
"shlex",
|
|
140
140
|
]
|
|
@@ -147,7 +147,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
|
|
147
147
|
|
|
148
148
|
[[package]]
|
|
149
149
|
name = "chain-gang"
|
|
150
|
-
version = "0.7.
|
|
150
|
+
version = "0.7.3"
|
|
151
151
|
dependencies = [
|
|
152
152
|
"async-mutex",
|
|
153
153
|
"async-trait",
|
|
@@ -242,9 +242,9 @@ checksum = "b72465f46d518f6015d9cf07f7f3013a95dd6b9c2747c3d65ae0cce43929d14f"
|
|
|
242
242
|
|
|
243
243
|
[[package]]
|
|
244
244
|
name = "der"
|
|
245
|
-
version = "0.7.
|
|
245
|
+
version = "0.7.10"
|
|
246
246
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
247
|
-
checksum = "
|
|
247
|
+
checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb"
|
|
248
248
|
dependencies = [
|
|
249
249
|
"const-oid",
|
|
250
250
|
"zeroize",
|
|
@@ -335,9 +335,9 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
|
|
|
335
335
|
|
|
336
336
|
[[package]]
|
|
337
337
|
name = "errno"
|
|
338
|
-
version = "0.3.
|
|
338
|
+
version = "0.3.11"
|
|
339
339
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
340
|
-
checksum = "
|
|
340
|
+
checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e"
|
|
341
341
|
dependencies = [
|
|
342
342
|
"libc",
|
|
343
343
|
"windows-sys 0.59.0",
|
|
@@ -447,9 +447,9 @@ dependencies = [
|
|
|
447
447
|
|
|
448
448
|
[[package]]
|
|
449
449
|
name = "getrandom"
|
|
450
|
-
version = "0.2.
|
|
450
|
+
version = "0.2.16"
|
|
451
451
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
452
|
-
checksum = "
|
|
452
|
+
checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592"
|
|
453
453
|
dependencies = [
|
|
454
454
|
"cfg-if",
|
|
455
455
|
"libc",
|
|
@@ -487,9 +487,9 @@ dependencies = [
|
|
|
487
487
|
|
|
488
488
|
[[package]]
|
|
489
489
|
name = "h2"
|
|
490
|
-
version = "0.4.
|
|
490
|
+
version = "0.4.9"
|
|
491
491
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
492
|
-
checksum = "
|
|
492
|
+
checksum = "75249d144030531f8dee69fe9cea04d3edf809a017ae445e2abdff6629e86633"
|
|
493
493
|
dependencies = [
|
|
494
494
|
"atomic-waker",
|
|
495
495
|
"bytes",
|
|
@@ -626,9 +626,9 @@ dependencies = [
|
|
|
626
626
|
|
|
627
627
|
[[package]]
|
|
628
628
|
name = "hyper-util"
|
|
629
|
-
version = "0.1.
|
|
629
|
+
version = "0.1.11"
|
|
630
630
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
631
|
-
checksum = "
|
|
631
|
+
checksum = "497bbc33a26fdd4af9ed9c70d63f61cf56a938375fbb32df34db9b1cd6d643f2"
|
|
632
632
|
dependencies = [
|
|
633
633
|
"bytes",
|
|
634
634
|
"futures-channel",
|
|
@@ -636,6 +636,7 @@ dependencies = [
|
|
|
636
636
|
"http",
|
|
637
637
|
"http-body",
|
|
638
638
|
"hyper",
|
|
639
|
+
"libc",
|
|
639
640
|
"pin-project-lite",
|
|
640
641
|
"socket2",
|
|
641
642
|
"tokio",
|
|
@@ -784,9 +785,9 @@ dependencies = [
|
|
|
784
785
|
|
|
785
786
|
[[package]]
|
|
786
787
|
name = "indexmap"
|
|
787
|
-
version = "2.
|
|
788
|
+
version = "2.9.0"
|
|
788
789
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
789
|
-
checksum = "
|
|
790
|
+
checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e"
|
|
790
791
|
dependencies = [
|
|
791
792
|
"equivalent",
|
|
792
793
|
"hashbrown",
|
|
@@ -842,9 +843,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
|
|
842
843
|
|
|
843
844
|
[[package]]
|
|
844
845
|
name = "libc"
|
|
845
|
-
version = "0.2.
|
|
846
|
+
version = "0.2.172"
|
|
846
847
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
847
|
-
checksum = "
|
|
848
|
+
checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa"
|
|
848
849
|
|
|
849
850
|
[[package]]
|
|
850
851
|
name = "linked-hash-map"
|
|
@@ -854,9 +855,9 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
|
|
|
854
855
|
|
|
855
856
|
[[package]]
|
|
856
857
|
name = "linux-raw-sys"
|
|
857
|
-
version = "0.9.
|
|
858
|
+
version = "0.9.4"
|
|
858
859
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
859
|
-
checksum = "
|
|
860
|
+
checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12"
|
|
860
861
|
|
|
861
862
|
[[package]]
|
|
862
863
|
name = "litemap"
|
|
@@ -893,9 +894,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
|
|
|
893
894
|
|
|
894
895
|
[[package]]
|
|
895
896
|
name = "miniz_oxide"
|
|
896
|
-
version = "0.8.
|
|
897
|
+
version = "0.8.8"
|
|
897
898
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
898
|
-
checksum = "
|
|
899
|
+
checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a"
|
|
899
900
|
dependencies = [
|
|
900
901
|
"adler2",
|
|
901
902
|
]
|
|
@@ -979,9 +980,9 @@ checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
|
|
|
979
980
|
|
|
980
981
|
[[package]]
|
|
981
982
|
name = "openssl"
|
|
982
|
-
version = "0.10.
|
|
983
|
+
version = "0.10.72"
|
|
983
984
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
984
|
-
checksum = "
|
|
985
|
+
checksum = "fedfea7d58a1f73118430a55da6a286e7b044961736ce96a16a17068ea25e5da"
|
|
985
986
|
dependencies = [
|
|
986
987
|
"bitflags",
|
|
987
988
|
"cfg-if",
|
|
@@ -1011,9 +1012,9 @@ checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e"
|
|
|
1011
1012
|
|
|
1012
1013
|
[[package]]
|
|
1013
1014
|
name = "openssl-sys"
|
|
1014
|
-
version = "0.9.
|
|
1015
|
+
version = "0.9.107"
|
|
1015
1016
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1016
|
-
checksum = "
|
|
1017
|
+
checksum = "8288979acd84749c744a9014b4382d42b8f7b2592847b5afb2ed29e5d16ede07"
|
|
1017
1018
|
dependencies = [
|
|
1018
1019
|
"cc",
|
|
1019
1020
|
"libc",
|
|
@@ -1082,18 +1083,18 @@ dependencies = [
|
|
|
1082
1083
|
|
|
1083
1084
|
[[package]]
|
|
1084
1085
|
name = "proc-macro2"
|
|
1085
|
-
version = "1.0.
|
|
1086
|
+
version = "1.0.95"
|
|
1086
1087
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1087
|
-
checksum = "
|
|
1088
|
+
checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778"
|
|
1088
1089
|
dependencies = [
|
|
1089
1090
|
"unicode-ident",
|
|
1090
1091
|
]
|
|
1091
1092
|
|
|
1092
1093
|
[[package]]
|
|
1093
1094
|
name = "pyo3"
|
|
1094
|
-
version = "0.24.
|
|
1095
|
+
version = "0.24.2"
|
|
1095
1096
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1096
|
-
checksum = "
|
|
1097
|
+
checksum = "e5203598f366b11a02b13aa20cab591229ff0a89fd121a308a5df751d5fc9219"
|
|
1097
1098
|
dependencies = [
|
|
1098
1099
|
"cfg-if",
|
|
1099
1100
|
"indoc",
|
|
@@ -1109,9 +1110,9 @@ dependencies = [
|
|
|
1109
1110
|
|
|
1110
1111
|
[[package]]
|
|
1111
1112
|
name = "pyo3-build-config"
|
|
1112
|
-
version = "0.24.
|
|
1113
|
+
version = "0.24.2"
|
|
1113
1114
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1114
|
-
checksum = "
|
|
1115
|
+
checksum = "99636d423fa2ca130fa5acde3059308006d46f98caac629418e53f7ebb1e9999"
|
|
1115
1116
|
dependencies = [
|
|
1116
1117
|
"once_cell",
|
|
1117
1118
|
"target-lexicon",
|
|
@@ -1119,9 +1120,9 @@ dependencies = [
|
|
|
1119
1120
|
|
|
1120
1121
|
[[package]]
|
|
1121
1122
|
name = "pyo3-ffi"
|
|
1122
|
-
version = "0.24.
|
|
1123
|
+
version = "0.24.2"
|
|
1123
1124
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1124
|
-
checksum = "
|
|
1125
|
+
checksum = "78f9cf92ba9c409279bc3305b5409d90db2d2c22392d443a87df3a1adad59e33"
|
|
1125
1126
|
dependencies = [
|
|
1126
1127
|
"libc",
|
|
1127
1128
|
"pyo3-build-config",
|
|
@@ -1129,9 +1130,9 @@ dependencies = [
|
|
|
1129
1130
|
|
|
1130
1131
|
[[package]]
|
|
1131
1132
|
name = "pyo3-macros"
|
|
1132
|
-
version = "0.24.
|
|
1133
|
+
version = "0.24.2"
|
|
1133
1134
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1134
|
-
checksum = "
|
|
1135
|
+
checksum = "0b999cb1a6ce21f9a6b147dcf1be9ffedf02e0043aec74dc390f3007047cecd9"
|
|
1135
1136
|
dependencies = [
|
|
1136
1137
|
"proc-macro2",
|
|
1137
1138
|
"pyo3-macros-backend",
|
|
@@ -1141,9 +1142,9 @@ dependencies = [
|
|
|
1141
1142
|
|
|
1142
1143
|
[[package]]
|
|
1143
1144
|
name = "pyo3-macros-backend"
|
|
1144
|
-
version = "0.24.
|
|
1145
|
+
version = "0.24.2"
|
|
1145
1146
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1146
|
-
checksum = "
|
|
1147
|
+
checksum = "822ece1c7e1012745607d5cf0bcb2874769f0f7cb34c4cde03b9358eb9ef911a"
|
|
1147
1148
|
dependencies = [
|
|
1148
1149
|
"heck",
|
|
1149
1150
|
"proc-macro2",
|
|
@@ -1194,7 +1195,7 @@ version = "0.6.4"
|
|
|
1194
1195
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1195
1196
|
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
|
|
1196
1197
|
dependencies = [
|
|
1197
|
-
"getrandom 0.2.
|
|
1198
|
+
"getrandom 0.2.16",
|
|
1198
1199
|
]
|
|
1199
1200
|
|
|
1200
1201
|
[[package]]
|
|
@@ -1294,7 +1295,7 @@ checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7"
|
|
|
1294
1295
|
dependencies = [
|
|
1295
1296
|
"cc",
|
|
1296
1297
|
"cfg-if",
|
|
1297
|
-
"getrandom 0.2.
|
|
1298
|
+
"getrandom 0.2.16",
|
|
1298
1299
|
"libc",
|
|
1299
1300
|
"untrusted",
|
|
1300
1301
|
"windows-sys 0.52.0",
|
|
@@ -1317,9 +1318,9 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
|
|
|
1317
1318
|
|
|
1318
1319
|
[[package]]
|
|
1319
1320
|
name = "rustix"
|
|
1320
|
-
version = "1.0.
|
|
1321
|
+
version = "1.0.5"
|
|
1321
1322
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1322
|
-
checksum = "
|
|
1323
|
+
checksum = "d97817398dd4bb2e6da002002db259209759911da105da92bec29ccb12cf58bf"
|
|
1323
1324
|
dependencies = [
|
|
1324
1325
|
"bitflags",
|
|
1325
1326
|
"errno",
|
|
@@ -1330,9 +1331,9 @@ dependencies = [
|
|
|
1330
1331
|
|
|
1331
1332
|
[[package]]
|
|
1332
1333
|
name = "rustls"
|
|
1333
|
-
version = "0.23.
|
|
1334
|
+
version = "0.23.26"
|
|
1334
1335
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1335
|
-
checksum = "
|
|
1336
|
+
checksum = "df51b5869f3a441595eac5e8ff14d486ff285f7b8c0df8770e49c3b56351f0f0"
|
|
1336
1337
|
dependencies = [
|
|
1337
1338
|
"once_cell",
|
|
1338
1339
|
"rustls-pki-types",
|
|
@@ -1518,9 +1519,9 @@ dependencies = [
|
|
|
1518
1519
|
|
|
1519
1520
|
[[package]]
|
|
1520
1521
|
name = "smallvec"
|
|
1521
|
-
version = "1.
|
|
1522
|
+
version = "1.15.0"
|
|
1522
1523
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1523
|
-
checksum = "
|
|
1524
|
+
checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9"
|
|
1524
1525
|
|
|
1525
1526
|
[[package]]
|
|
1526
1527
|
name = "snowflake"
|
|
@@ -1562,9 +1563,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
|
|
|
1562
1563
|
|
|
1563
1564
|
[[package]]
|
|
1564
1565
|
name = "syn"
|
|
1565
|
-
version = "2.0.
|
|
1566
|
+
version = "2.0.101"
|
|
1566
1567
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1567
|
-
checksum = "
|
|
1568
|
+
checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf"
|
|
1568
1569
|
dependencies = [
|
|
1569
1570
|
"proc-macro2",
|
|
1570
1571
|
"quote",
|
|
@@ -1663,9 +1664,9 @@ dependencies = [
|
|
|
1663
1664
|
|
|
1664
1665
|
[[package]]
|
|
1665
1666
|
name = "tokio"
|
|
1666
|
-
version = "1.44.
|
|
1667
|
+
version = "1.44.2"
|
|
1667
1668
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1668
|
-
checksum = "
|
|
1669
|
+
checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48"
|
|
1669
1670
|
dependencies = [
|
|
1670
1671
|
"backtrace",
|
|
1671
1672
|
"bytes",
|
|
@@ -1698,9 +1699,9 @@ dependencies = [
|
|
|
1698
1699
|
|
|
1699
1700
|
[[package]]
|
|
1700
1701
|
name = "tokio-util"
|
|
1701
|
-
version = "0.7.
|
|
1702
|
+
version = "0.7.15"
|
|
1702
1703
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1703
|
-
checksum = "
|
|
1704
|
+
checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df"
|
|
1704
1705
|
dependencies = [
|
|
1705
1706
|
"bytes",
|
|
1706
1707
|
"futures-core",
|
|
@@ -2219,18 +2220,18 @@ dependencies = [
|
|
|
2219
2220
|
|
|
2220
2221
|
[[package]]
|
|
2221
2222
|
name = "zerocopy"
|
|
2222
|
-
version = "0.8.
|
|
2223
|
+
version = "0.8.25"
|
|
2223
2224
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2224
|
-
checksum = "
|
|
2225
|
+
checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb"
|
|
2225
2226
|
dependencies = [
|
|
2226
2227
|
"zerocopy-derive",
|
|
2227
2228
|
]
|
|
2228
2229
|
|
|
2229
2230
|
[[package]]
|
|
2230
2231
|
name = "zerocopy-derive"
|
|
2231
|
-
version = "0.8.
|
|
2232
|
+
version = "0.8.25"
|
|
2232
2233
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2233
|
-
checksum = "
|
|
2234
|
+
checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef"
|
|
2234
2235
|
dependencies = [
|
|
2235
2236
|
"proc-macro2",
|
|
2236
2237
|
"quote",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "chain-gang"
|
|
3
|
-
version = "0.7.
|
|
3
|
+
version = "0.7.3"
|
|
4
4
|
description = "This is a library that enables monitoring of multiple blockchains (BTC, BCH, BSV)."
|
|
5
5
|
# repository = "https://github.com/brentongunning/rust-sv"
|
|
6
6
|
authors = ["Arthur Gordon <a.gordon@nchain.com>"]
|
|
@@ -13,7 +13,7 @@ byteorder = "1.2"
|
|
|
13
13
|
dns-lookup = "2.0.4"
|
|
14
14
|
hex = "0.4.3"
|
|
15
15
|
linked-hash-map = "0.5"
|
|
16
|
-
log = { version = "0.4.
|
|
16
|
+
log = { version = "0.4.27", features = ["max_level_trace", "release_max_level_warn"] }
|
|
17
17
|
db-key = "0.0.5"
|
|
18
18
|
thiserror = "2.0.12"
|
|
19
19
|
url = "2.5.4"
|
|
@@ -37,12 +37,12 @@ pbkdf2 = "0.12.2"
|
|
|
37
37
|
# Used by the interface feature
|
|
38
38
|
serde = { version = "1.0.219", features = ["derive"], optional = true }
|
|
39
39
|
serde_json = { version = "1.0.140", optional = true }
|
|
40
|
-
reqwest = { version = "0.12.
|
|
41
|
-
async-mutex = { version = "1.4.
|
|
42
|
-
async-trait = { version = "0.1.
|
|
40
|
+
reqwest = { version = "0.12.15", features = ["json"], optional = true }
|
|
41
|
+
async-mutex = { version = "1.4.1", optional = true }
|
|
42
|
+
async-trait = { version = "0.1.88", optional = true }
|
|
43
43
|
|
|
44
44
|
# For python feature
|
|
45
|
-
pyo3 = { version = "0.24.
|
|
45
|
+
pyo3 = { version = "0.24.2", optional = true }
|
|
46
46
|
regex = "^1.5.5"
|
|
47
47
|
lazy_static = "1.5.0"
|
|
48
48
|
rand_core = "0.9.3"
|
|
@@ -46,4 +46,5 @@
|
|
|
46
46
|
* v0.6.15 - Try again - remove two more platforms that did not read env vars
|
|
47
47
|
* v0.7.0 - Bump version for Python 3.13 support
|
|
48
48
|
* v0.7.1 - Fixed OP_CODESEPARATOR
|
|
49
|
-
* v0.7.2 - Added OP_2MUL and OP_2DIV script operations
|
|
49
|
+
* v0.7.2 - Added OP_2MUL and OP_2DIV script operations
|
|
50
|
+
* v0.7.3 - Fixed WoC endpoints get_block_header and get_merkle_proof to use new TSC endpoint
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
""" Test of WhatsOnChain API calls
|
|
2
|
+
"""
|
|
3
|
+
import unittest
|
|
4
|
+
from tx_engine import interface_factory
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
CONFIG = {
|
|
8
|
+
"interface_type": "woc",
|
|
9
|
+
"network_type": "testnet",
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class WoCTests(unittest.TestCase):
|
|
14
|
+
""" Tests of WhatsOnChain API calls
|
|
15
|
+
"""
|
|
16
|
+
def setUp(self):
|
|
17
|
+
self.woc_interface = interface_factory.set_config(CONFIG)
|
|
18
|
+
self.maxDiff = 4096
|
|
19
|
+
return super().setUp()
|
|
20
|
+
|
|
21
|
+
def test_get_block_header(self):
|
|
22
|
+
block_hash = "000000001a06963e6bc2bd798fa848e57856b9239c22feba644ec100dc809fe4"
|
|
23
|
+
result = self.woc_interface.get_block_header(block_hash)
|
|
24
|
+
assert result is not None
|
|
25
|
+
expected_result = {
|
|
26
|
+
'hash': '000000001a06963e6bc2bd798fa848e57856b9239c22feba644ec100dc809fe4',
|
|
27
|
+
# 'confirmations': 8,
|
|
28
|
+
'size': 184,
|
|
29
|
+
'height': 1671921,
|
|
30
|
+
'version': 536870912,
|
|
31
|
+
'versionHex': '20000000',
|
|
32
|
+
'merkleroot': '998b84019194d5dc5a505997dc17554bb398ac026e4d1fd023571a1d76e3fb63',
|
|
33
|
+
'time': 1745842569,
|
|
34
|
+
'mediantime': 1745839474,
|
|
35
|
+
'nonce': 3248024860,
|
|
36
|
+
'bits': '1c5abd74',
|
|
37
|
+
'difficulty': 2.82120287754299,
|
|
38
|
+
'chainwork': '00000000000000000000000000000000000000000000015814b6013f8e293653',
|
|
39
|
+
'previousblockhash': '00000000122ac20c9fcf1d9f5dca32f8466215a2ef87efb86d9efd1cd0010a88',
|
|
40
|
+
'nextblockhash': '000000001a704a33a4a82cf348b1ffe4403e49f1e2368897712745fabfaf0182',
|
|
41
|
+
'nTx': 0,
|
|
42
|
+
'num_tx': 1
|
|
43
|
+
}
|
|
44
|
+
# Check all fields except `confirmations` which will change
|
|
45
|
+
for k, v in expected_result.items():
|
|
46
|
+
self.assertEqual(result[k], v)
|
|
47
|
+
|
|
48
|
+
def test_get_block(self):
|
|
49
|
+
block_hash = "000000001a06963e6bc2bd798fa848e57856b9239c22feba644ec100dc809fe4"
|
|
50
|
+
result = self.woc_interface.get_block(block_hash)
|
|
51
|
+
assert result is not None
|
|
52
|
+
expected_result = {
|
|
53
|
+
'hash': '000000001a06963e6bc2bd798fa848e57856b9239c22feba644ec100dc809fe4',
|
|
54
|
+
# 'confirmations': 9,
|
|
55
|
+
'size': 184,
|
|
56
|
+
'height': 1671921,
|
|
57
|
+
'version': 536870912,
|
|
58
|
+
'versionHex': '20000000',
|
|
59
|
+
'merkleroot': '998b84019194d5dc5a505997dc17554bb398ac026e4d1fd023571a1d76e3fb63',
|
|
60
|
+
'txcount': 1,
|
|
61
|
+
'nTx': 0,
|
|
62
|
+
'num_tx': 1,
|
|
63
|
+
'tx': ['998b84019194d5dc5a505997dc17554bb398ac026e4d1fd023571a1d76e3fb63'],
|
|
64
|
+
'time': 1745842569,
|
|
65
|
+
'mediantime': 1745839474,
|
|
66
|
+
'nonce': 3248024860,
|
|
67
|
+
'bits': '1c5abd74',
|
|
68
|
+
'difficulty': 2.82120287754299,
|
|
69
|
+
'chainwork': '00000000000000000000000000000000000000000000015814b6013f8e293653',
|
|
70
|
+
'previousblockhash': '00000000122ac20c9fcf1d9f5dca32f8466215a2ef87efb86d9efd1cd0010a88',
|
|
71
|
+
'nextblockhash': '000000001a704a33a4a82cf348b1ffe4403e49f1e2368897712745fabfaf0182',
|
|
72
|
+
'coinbaseTx': {
|
|
73
|
+
'txid': '998b84019194d5dc5a505997dc17554bb398ac026e4d1fd023571a1d76e3fb63',
|
|
74
|
+
'hash': '998b84019194d5dc5a505997dc17554bb398ac026e4d1fd023571a1d76e3fb63',
|
|
75
|
+
'version': 1,
|
|
76
|
+
'size': 103,
|
|
77
|
+
'locktime': 0,
|
|
78
|
+
'vin': [{
|
|
79
|
+
'coinbase': '03f182190d546573746e6574204d696e6572',
|
|
80
|
+
'txid': '',
|
|
81
|
+
'vout': 0,
|
|
82
|
+
'scriptSig': {
|
|
83
|
+
'asm': '',
|
|
84
|
+
'hex': ''
|
|
85
|
+
},
|
|
86
|
+
'sequence': 4294967295
|
|
87
|
+
}],
|
|
88
|
+
'vout': [{
|
|
89
|
+
'value': 0.390625,
|
|
90
|
+
'n': 0,
|
|
91
|
+
'scriptPubKey': {
|
|
92
|
+
'asm': 'OP_DUP OP_HASH160 0e84c845ae3af3ba20e8da29a4827abe93b639a4 OP_EQUALVERIFY OP_CHECKSIG',
|
|
93
|
+
'hex': '76a9140e84c845ae3af3ba20e8da29a4827abe93b639a488ac',
|
|
94
|
+
'reqSigs': 1,
|
|
95
|
+
'type': 'pubkeyhash',
|
|
96
|
+
'addresses': ['mgqipciCS56nCYSjB1vTcDGskN82yxfo1G'],
|
|
97
|
+
'isTruncated': False
|
|
98
|
+
}
|
|
99
|
+
}],
|
|
100
|
+
'blockhash': '000000001a06963e6bc2bd798fa848e57856b9239c22feba644ec100dc809fe4',
|
|
101
|
+
# 'confirmations': 9,
|
|
102
|
+
'time': 1745842569,
|
|
103
|
+
'blocktime': 1745842569,
|
|
104
|
+
'blockheight': 1671921
|
|
105
|
+
},
|
|
106
|
+
'totalFees': 0,
|
|
107
|
+
'miner': '\x03��\x19\rTestnet Miner',
|
|
108
|
+
'pages': None
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
# Check all fields except `confirmations` which will change
|
|
112
|
+
# Note dictionary can have dictionary..
|
|
113
|
+
for k, v in expected_result.items():
|
|
114
|
+
if isinstance(v, dict):
|
|
115
|
+
for k1, v1 in v.items():
|
|
116
|
+
self.assertEqual(result[k][k1], v1)
|
|
117
|
+
else:
|
|
118
|
+
self.assertEqual(result[k], v)
|
|
119
|
+
|
|
120
|
+
def test_get_merkle_proof(self):
|
|
121
|
+
block_hash = ""
|
|
122
|
+
txid = "6106903f0e8e905b749b73d2a7239a22d2f06faf95f66e2ee4db77d875bf7bea"
|
|
123
|
+
result = self.woc_interface.get_merkle_proof(block_hash, txid)
|
|
124
|
+
assert result is not None
|
|
125
|
+
expected_result = [{
|
|
126
|
+
'index': 3,
|
|
127
|
+
'txOrId': '6106903f0e8e905b749b73d2a7239a22d2f06faf95f66e2ee4db77d875bf7bea',
|
|
128
|
+
'target': '0000000011eb7961f5b07c64f130c19eb0e1c61a1273d5774eff54f72a847d14',
|
|
129
|
+
'nodes': ['d947f541793cccf9a43463d21a1318f99144a2a7ee4b41fd36c74dfe87df065a', '8205865d2b22f2a83367dd338498d7bf41c0a7cf3eedcfb0579885cb98a767d1']
|
|
130
|
+
}]
|
|
131
|
+
self.assertEqual(result, expected_result)
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
if __name__ == "__main__":
|
|
135
|
+
unittest.main()
|
|
@@ -103,7 +103,7 @@ def get_chain_info(testnet: bool = True):
|
|
|
103
103
|
def get_merkle_proof(tx_id: str, testnet: bool = True):
|
|
104
104
|
""" This endpoint retrieves the merkle tree info for a given confirmed tx
|
|
105
105
|
"""
|
|
106
|
-
return get_response(f"{get_url(testnet)}/tx/{tx_id}/proof")
|
|
106
|
+
return get_response(f"{get_url(testnet)}/tx/{tx_id}/proof/tsc")
|
|
107
107
|
|
|
108
108
|
|
|
109
109
|
def broadcast_tx(transaction: str, testnet: bool = True):
|
|
@@ -123,4 +123,4 @@ def get_block_by_hash(block_hash: str, testnet: bool = True):
|
|
|
123
123
|
def get_block_header(block_hash: str, testnet: bool = True) -> Dict:
|
|
124
124
|
""" Get a blockheader by hash
|
|
125
125
|
"""
|
|
126
|
-
return get_response(f"{get_url(testnet)}/block/
|
|
126
|
+
return get_response(f"{get_url(testnet)}/block/{block_hash}/header")
|
|
@@ -173,9 +173,9 @@ impl UaaSInterface {
|
|
|
173
173
|
log::debug!("add_monitor");
|
|
174
174
|
// check the input is valid
|
|
175
175
|
if monitor.address.is_none() && monitor.locking_script_pattern.is_none() {
|
|
176
|
-
return Err(ChainGangError::BadArgument(
|
|
177
|
-
"monitor requires address or locking_script pattern"
|
|
178
|
-
))
|
|
176
|
+
return Err(ChainGangError::BadArgument(
|
|
177
|
+
"monitor requires address or locking_script pattern".to_string()
|
|
178
|
+
));
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
let add_monitor_url = self.url.join("/collection/monitor").unwrap();
|
|
@@ -35,7 +35,7 @@ impl MerkleBlock {
|
|
|
35
35
|
let mut row_len = self.total_transactions as usize;
|
|
36
36
|
let mut total_nodes = row_len;
|
|
37
37
|
while row_len > 1 {
|
|
38
|
-
row_len = (
|
|
38
|
+
row_len = row_len.div_ceil(2);
|
|
39
39
|
total_nodes += row_len;
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -61,7 +61,7 @@ impl MerkleBlock {
|
|
|
61
61
|
return Err(ChainGangError::BadData("Not all nodes consumed".to_string()));
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
if (
|
|
64
|
+
if flag_bits_used.div_ceil(8) < self.flags.len() {
|
|
65
65
|
return Err(ChainGangError::BadData("Not all flag bits consumed".to_string()));
|
|
66
66
|
}
|
|
67
67
|
|
|
@@ -80,13 +80,13 @@ impl PeerFilter for PeerNodeFilter {
|
|
|
80
80
|
fn connectable(&self, version: &Version) -> bool {
|
|
81
81
|
self.user_agent
|
|
82
82
|
.as_ref()
|
|
83
|
-
.
|
|
83
|
+
.is_none_or(|user_agent| version.user_agent.contains(user_agent))
|
|
84
84
|
&& self
|
|
85
85
|
.start_height
|
|
86
|
-
.
|
|
86
|
+
.is_none_or(|start_height| version.start_height >= start_height)
|
|
87
87
|
&& self
|
|
88
88
|
.services
|
|
89
|
-
.
|
|
89
|
+
.is_none_or(|services| version.services & services != 0)
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
|
|
@@ -595,7 +595,7 @@ pub fn core_eval<T: Checker>(
|
|
|
595
595
|
}
|
|
596
596
|
// Add zeros
|
|
597
597
|
let diff = m.to_usize().unwrap() - n.len();
|
|
598
|
-
v.extend(std::iter::
|
|
598
|
+
v.extend(std::iter::repeat_n(0, diff));
|
|
599
599
|
// Prepend the value
|
|
600
600
|
for b in n.iter().rev() {
|
|
601
601
|
v.insert(0, *b);
|
|
@@ -32,7 +32,7 @@ impl Bits {
|
|
|
32
32
|
let mut vec = data.to_vec();
|
|
33
33
|
let len = min(data.len() * 8, len);
|
|
34
34
|
if len > vec.len() * 8 {
|
|
35
|
-
vec.truncate((
|
|
35
|
+
vec.truncate(len.div_ceil(8));
|
|
36
36
|
}
|
|
37
37
|
let rem = (len % 8) as u8;
|
|
38
38
|
if rem != 0 {
|
|
@@ -76,7 +76,7 @@ impl Bits {
|
|
|
76
76
|
let end = i + len;
|
|
77
77
|
let mut curr: u64 = 0;
|
|
78
78
|
let mut i = i;
|
|
79
|
-
for j in i / 8..(
|
|
79
|
+
for j in i / 8..(i + len).div_ceil(8) {
|
|
80
80
|
let b_len = min(end - i, 8 - (i - j * 8));
|
|
81
81
|
curr = (curr << b_len) | self.extract_byte(i, b_len) as u64;
|
|
82
82
|
i += b_len;
|
|
@@ -77,7 +77,7 @@ impl BloomFilter {
|
|
|
77
77
|
let c = murmur3_32(&mut Cursor::new(&data), seed.0)
|
|
78
78
|
.expect("error encoding murmur3 hash")
|
|
79
79
|
% (self.filter.len() as u32 * 8);
|
|
80
|
-
if self.filter[c as usize / 8] & 1 << (c % 8) == 0 {
|
|
80
|
+
if self.filter[c as usize / 8] & (1 << (c % 8)) == 0 {
|
|
81
81
|
return false;
|
|
82
82
|
}
|
|
83
83
|
}
|
|
@@ -74,7 +74,7 @@ impl<T> Observer<T> for Subject<T> {
|
|
|
74
74
|
observers.retain(|observer| observer.upgrade().is_some());
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
let any_pending = { self.pending.read().unwrap().
|
|
77
|
+
let any_pending = { !self.pending.read().unwrap().is_empty() };
|
|
78
78
|
if any_pending {
|
|
79
79
|
let mut observers = self.observers.write().unwrap();
|
|
80
80
|
let mut pending = self.pending.write().unwrap();
|
|
@@ -44,7 +44,7 @@ fn load_wordlist_internal(bytes: &[u8]) -> Vec<String> {
|
|
|
44
44
|
pub fn mnemonic_encode(data: &[u8], word_list: &[String]) -> Vec<String> {
|
|
45
45
|
let hash = Sha256::digest(data);
|
|
46
46
|
|
|
47
|
-
let mut words = Vec::with_capacity((data.len() * 8 + data.len() / 32
|
|
47
|
+
let mut words = Vec::with_capacity((data.len() * 8 + data.len() / 32).div_ceil(11));
|
|
48
48
|
let mut bits = Bits::from_slice(data, data.len() * 8);
|
|
49
49
|
bits.append(&Bits::from_slice(hash.as_ref(), data.len() / 4));
|
|
50
50
|
for i in 0..bits.len / 11 {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|