Commit Graph

1591 Commits

Author SHA1 Message Date
Elichai Turkel 41e4471721
Remove alloc when hashing sighash 2020-04-12 19:04:12 +03:00
Steven Roose fea09a0a94
Improve the Instructions iterator for scripts
- Rename the `iter` method to `instructions`.
- Add `instructions_minimal` for minimal-enforced iteration.
- Iterator has `Result<Instruction, Error>` as items.
2020-04-11 23:52:26 +01:00
Andrew Poelstra c3a7d1b27c
Merge pull request #417 from shesek/202003-block-size-weight
Add Block::get_size() and Block::get_weight()
2020-04-07 14:12:15 +00:00
Andrew Poelstra 8d859cf54c
Merge pull request #308 from elichai/2019-08-clippy
Cargo clippy changes
2020-04-05 16:26:07 +00:00
Elichai Turkel a627457032
Merge pull request #412 from stevenroose/export-denom
Export the util::amount::Denomination type
2020-04-05 10:56:57 +03:00
Andrew Poelstra 78183a31e2
Merge pull request #411 from tnull/handshake_example
Added a simple handshake example.
2020-04-04 21:34:57 +00:00
Elichai Turkel 2cc88a99aa
Removed PartialEq,PartialOrd impls, shouldn't be manually impl when Hash is derived 2020-03-29 17:15:15 +03:00
Elichai Turkel a473d01b17
Made some idiomatic changes 2020-03-29 17:15:15 +03:00
Elichai Turkel 3f2d428706
Remove needless references 2020-03-29 17:15:14 +03:00
Elichai Turkel 16eb81e1f7
Replaced slow vec initialization, and dual calls to hashmap 2020-03-29 17:10:27 +03:00
Nadav Ivgi 94032f6817 Add Block::get_size() and Block::get_weight() 2020-03-27 21:54:46 +03:00
Steven Roose a148e06736
Merge pull request #416 from shesek/202003-tx-size
Add Transaction::get_size()
2020-03-25 16:18:23 +00:00
Nadav Ivgi f3b5a7187c
Add Transaction::get_size() 2020-03-23 19:48:41 +02:00
Nadav Ivgi 65efc5cd37 Allow to construct MerkleBlock using the header and txids
Co-Authored-By: Elichai Turkel <elichai.turkel@gmail.com>
2020-03-21 18:23:08 +02:00
Steven Roose 6186ee6269
Change Amount Debug impl to BTC with 8 decimals 2020-03-07 19:52:16 +00:00
Elias Rohrer 827d98d821 Fixed for rust 1.22.0. 2020-03-03 12:18:37 +01:00
Elias Rohrer aa46618da7 Intialize stream reader only once. 2020-03-03 10:48:01 +01:00
Elias Rohrer 40431f3d4f Formatted. 2020-03-03 10:48:01 +01:00
Elias Rohrer b5f5abe0b4 Removed pre-configured IP, now takes IP as argument. 2020-03-03 10:48:01 +01:00
Elias Rohrer 62f5f8e3f9 Removed explicit dependency on rand. 2020-03-03 10:48:01 +01:00
Elias Rohrer 2852083ff3 Using write_all(). 2020-03-03 10:48:01 +01:00
Elias Rohrer c4f0056856 No clone needed. 2020-03-03 10:48:01 +01:00
Elias Rohrer 9d212da0ba Added a simple handshake example. 2020-03-03 10:48:01 +01:00
Steven Roose 826b2e0e2a
Export the util::amount::Denomination type 2020-02-28 11:51:44 +00:00
Steven Roose 9cff794a09
Merge pull request #399 from elichai/2020-01-tests
Add tests based on mutagen outputs
2020-02-24 19:29:19 +00:00
Elichai Turkel 07b30c7fac
Mutation testing: amount: Added tests to fix mutation misses 2020-02-23 15:59:26 +02:00
Elichai Turkel ab6e20c87e
Fix an overflow bug in SignedAmount to_string/fmt 2020-02-23 15:59:26 +02:00
Elichai Turkel abc70781e7
Fix a logic problem in base58 (isn't a real bug) 2020-02-23 15:59:26 +02:00
Elichai Turkel 1d01262d5c
Mutation testing: base58: Added tests to "fix" mutation misses 2020-02-23 15:59:26 +02:00
Elichai Turkel 5d276caf95
Mutation testing: encode: Added tests to "fix" mutation misses 2020-02-23 15:59:26 +02:00
Elichai Turkel eb7369b1db
Simlify consensus_encode vectors 2020-02-23 15:59:23 +02:00
Andrew Poelstra 1b946b0034
Merge pull request #378 from wbnns/readme-links
readme: Add links to CHANGELOG.md and LICENSE
2020-01-24 19:41:29 +00:00
Andrew Poelstra a2bfcb5a89
Merge pull request #395 from pandoracore/fix-construct_uint
Improving `construct_uint` macro
2020-01-24 19:39:32 +00:00
Andrew Poelstra 659f2edb3b
Merge pull request #381 from elichai/2020-01-hex
Remove the hex dependency
2020-01-24 19:14:20 +00:00
Andrew Poelstra bf6828c47f
Merge pull request #398 from elichai/2020-01-json
Yet another MSRV breaking change
2020-01-23 15:20:42 +00:00
Elichai Turkel 399950bf71
Restrict serde-json dev dependency to less than 1.0.45 2020-01-23 11:45:59 +02:00
Will Binns 410e45f378
readme: Add links to CHANGELOG.md and LICENSE 2020-01-23 10:45:18 +01:00
Dr Maxim Orlovsky 9c0f4b1a60 Fixing namespaces in `impl_hashencode` 2020-01-22 13:23:09 +01:00
Steven Roose 930a6ca1dc
Merge pull request #390 from instagibbs/bip143_sighash_notall
Add bip143 sighash support for other flags
2020-01-21 23:26:17 +00:00
Gregory Sanders d1c5c7b08d Deprecate SigHashComponents 2020-01-21 09:50:41 -05:00
Gregory Sanders 908aff50bc Add bip143 sighash support for other flags 2020-01-21 09:50:41 -05:00
Dr Maxim Orlovsky f3e762b555 Improving `construct_uint` macro 2020-01-21 13:16:34 +01:00
Elichai Turkel c19b736566
Remove the hex dependency 2020-01-20 18:50:02 +02:00
Elichai Turkel 5452260884
Merge pull request #392 from instagibbs/wit_scale
Add, use WITNESS_SCALE_FACTOR constant
2020-01-20 18:02:59 +02:00
Gregory Sanders 2916685ca6 small Transaction test cleanup 2020-01-14 11:14:23 -05:00
Gregory Sanders 3624ee82c8 Use witness scaling constant in get_weight 2020-01-14 11:14:23 -05:00
Gregory Sanders 09c0e7fbde Add WITNESS_SCALE_FACTOR constant 2020-01-14 11:14:23 -05:00
Steven Roose e76803be85
Merge pull request #385 from stevenroose/no-bitcoin-hash
Remove the BitcoinHash trait
2020-01-13 16:45:31 +01:00
Steven Roose 8e52b8ce4d
Remove the BitcoinHash trait
Replaced by a `block_hash` method on both `Block` and `BlockHeader`.
2020-01-10 11:34:16 +00:00
Andrew Poelstra 2cba81935d
Merge pull request #380 from stevenroose/bump-0.23
Release v0.23.0
2020-01-09 17:02:43 +00:00