Commit Graph

3848 Commits

Author SHA1 Message Date
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
Steven Roose 2326dd6a82
Update secp256k1's rand feature to rand-std 2020-01-09 11:11:49 +00:00
Steven Roose 2f89c943e1
Release v0.23.0 2020-01-07 19:27:05 +00:00
Steven Roose 7587c4bf71
Merge pull request #379 from kiminuo/feature/network_address_debug
Improve fmt::Debug for network/Address
2020-01-07 17:39:14 +00:00
Steven Roose e6bc3ec974
Merge pull request #366 from stevenroose/bump-secp
Release v0.22.0
2020-01-07 16:05:29 +00:00
kiminuo 9e223988fa Improve fmt::Debug for network/Address
Original output:

  "Address {services: ServiceFlags(9), address: [0, 0, 0, 0, 0, 65535, 2560, 1], port: 8333}"

New output:

  * for IPv4: "Address {services: ServiceFlags(NETWORK|WITNESS), address: 10.0.0.1, port: 8333}"
  * for IPv6: "Address {services: ServiceFlags(NETWORK_LIMITED), address: fd87:d87e:eb43::ffff:a00:1, port: 8333}"
2020-01-07 12:30:47 +01:00
Andrew Cann d156c65778 Fix serde struct macros deserialization impls
The Deserialize impls generated by serde_struct_impl and
serde_struct_human_string_impl need to be able to handle serialization
formats which serialize structs as sequences (such as bincode).

This commit adds visit_seq methods to the Visitor types defined by these
macros, in addition to the existing visit_map methods. The
implementation is taken directly from the serde docs:
https://serde.rs/deserialize-struct.html
2020-01-07 13:19:22 +08:00
Steven Roose 448b45a3ba
Bump version to v0.22.0 2020-01-06 22:36:15 +00:00
Steven Roose 0398ef8f48
Update changelog for v0.22.0 2020-01-06 22:36:14 +00:00
Andrew Poelstra 50f3a60712
Merge pull request #349 from pandoracore/hashtypes
Hash new types as specified in #284
2020-01-05 00:46:45 +00:00
Dr Maxim Orlovsky 5fc24dea33 Multiple fixes for hash types and their computing
Unit test for wtxid and SegWit transactions
2020-01-01 13:54:23 +01:00
Dr Maxim Orlovsky 0abe15b1f6 Moving from BitcoinHash to Wtxid for Transactions 2020-01-01 13:52:20 +01:00
Dr Maxim Orlovsky f5a8087105 New hash types: MerkleRoot/Branch, WitnessCommit, SigHash, FilterHash 2020-01-01 13:50:17 +01:00
Dr Maxim Orlovsky 4746ccb88e Final work on Txid and other hashes
Fixing issue with external dependency and hash_newtype macro implementation

Reverting back to the bitcoin_hashes crate after new version release
2020-01-01 13:48:28 +01:00
Dr Maxim Orlovsky d20ab1dbc4 Switching to XpubIdentifier 2020-01-01 13:46:44 +01:00
Dr Maxim Orlovsky 5f4f629bb1 Replaced all hash160, sha256 and sha256d with the new hash types throughout the code
Embedding Txid's in the doc exaples
2020-01-01 13:44:34 +01:00
Dr Maxim Orlovsky 5ef39e34fa Implementing (W)Pubkey/ScriptHash and BlockHash 2020-01-01 13:42:22 +01:00
Dr Maxim Orlovsky ec92a05682 New HashTypes defined according to #284 (WIP), Txid is completed 2020-01-01 13:41:42 +01:00
Steven Roose e2caebc42e
Merge pull request #370 from elichai/2019-12-rawmessage
Add a full round test for RawNetworkMessage
2019-12-23 12:30:11 +01:00
Andrew Poelstra efd2168364
Merge pull request #368 from mauzmorose/bip157-service-flag
bip157: Add NODE_COMPACT_FILTERS Service Flag
2019-12-22 16:48:16 +00:00
Elichai Turkel bc2ba5bb12
Add a full round test for RawNetworkMessage 2019-12-22 14:01:12 +02:00
Elichai Turkel 4c3ad9d233
Merge pull request #367 from mauzmorose/fix-bip157-message
bip157: Fix typo on getcfcheckpt command string
2019-12-22 13:59:54 +02:00
Sofiane Baltaci 8617de51c8 Adapt service_flags_test to reflect changes 2019-12-21 03:36:47 +01:00
Sofiane Baltaci 43789b1d5a Add COMPACT_FILTERS service flag to ServiceFlags fmt::Display impl 2019-12-21 03:06:03 +01:00
Sofiane Baltaci b40d94641d Add bip157 NODE_COMPACT_FILTERS Service Flag 2019-12-21 02:39:30 +01:00
Sofiane Baltaci 2605141ada Fix typo on getcfcheckpt command string 2019-12-20 23:47:40 +01:00
Andrew Poelstra a643ac485c
Merge pull request #364 from kiminuo/feature/explicit-serviceFlags
Convert numeric representation of ServiceFlags to bitwise OR of the f…
2019-12-12 13:35:01 +00:00
kiminuo 74285738ce Convert numeric representation of ServiceFlags to bitwise OR of the flag names
The changes affect only tests
2019-12-12 00:11:13 +01:00
Steven Roose 0f4f060e8b
Merge pull request #363 from kiminuo/feature/remove-old-todos
Remove two old TODO comments [nit]
2019-12-11 16:53:20 +00:00
Steven Roose 024557fe47
Merge pull request #357 from stevenroose/command-str
Various optimizations of the network code
2019-12-11 15:38:52 +00:00
kiminuo 269ddb6f07 Remove some old TODO comments 2019-12-11 08:26:04 +01:00
Andrew Poelstra f6f4ea79d6
Merge pull request #360 from kiminuo/feature/issue-350
Feature/issue 350
2019-12-10 20:52:21 +00:00
Steven Roose a8f14af24d
Prevent panic on oversized CommandString's 2019-12-10 20:20:04 +00:00
Andrew Poelstra fef3390d78
Merge pull request #329 from stevenroose/overloaded-encode-error
Overloaded encode error
2019-12-10 13:23:56 +00:00
Steven Roose 617c07d796
Remove encode::Error::ByteOrder
Functions from the byteorder crate only return downstream io errors on
io calls.
2019-12-09 14:19:11 +00:00
Steven Roose 5f4555bfac
Remove util::misc::hex_bytes in favor of bitcoin_hashes::hex 2019-12-09 14:19:09 +00:00
Steven Roose 0469453da6
Use psbt::Error in PartiallySignedTransaction::from_unsigned_tx 2019-12-09 14:19:07 +00:00
Steven Roose 1eeaccc92e
Add encode::Error::NonMinimalVarInt variant 2019-12-09 14:19:05 +00:00
Steven Roose d02318f423
Remove deprecated std::error::Error::description 2019-12-09 14:18:37 +00:00
Steven Roose 5373428510
Drop unused encode::Error::Secp256k1 variant 2019-12-09 14:17:41 +00:00
Steven Roose 725884bab5
Introduce key::Error 2019-12-09 14:17:39 +00:00
Andrew Poelstra 1d209362eb
Merge pull request #361 from stevenroose/inventory-hash
Implement std:#️⃣:Hash for Inventory
2019-12-09 00:43:03 +00:00
Steven Roose fe3397399e
Add Copy to InvType enum 2019-12-08 20:58:52 +00:00
Steven Roose 671b3173c8
Make internals for CommandString private
The From traits and AsRef and Display implementations
let you do all you want.
2019-12-08 20:58:50 +00:00