Sofiane Baltaci
b40d94641d
Add bip157 NODE_COMPACT_FILTERS Service Flag
2019-12-21 02:39:30 +01: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
Steven Roose
a8f14af24d
Prevent panic on oversized CommandString's
2019-12-10 20:20:04 +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
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
Steven Roose
83f55b7f1d
Follow Rust std practice for RejectReason enum
2019-12-08 20:58:49 +00:00
Steven Roose
5c84e9671f
Optimize Reject message
2019-12-08 20:58:46 +00:00
Steven Roose
c30d6d12ab
Implement Encodable for Cow<'static, str>
2019-12-08 20:57:46 +00:00
Steven Roose
e37fdb7319
Also have getter for CommandString
2019-12-08 20:57:07 +00:00
Steven Roose
e2eed78964
nit: Reject is implemented
2019-12-08 20:57:05 +00:00
Steven Roose
50a37f415e
Implement From<String> and From<&'static str> for CommandString
2019-12-08 20:57:04 +00:00
Steven Roose
36838b7918
Make network::CommandString a Cow on 'static
2019-12-08 20:57:03 +00:00
Steven Roose
bac3e0308b
Add command method to NetworkMessage
...
Also make the return type an &'static str
2019-12-08 20:57:00 +00:00
Steven Roose
b4c4a9658d
Implement std: #️⃣ :Hash for Inventory
2019-12-08 17:49:11 +00:00
Andrew Poelstra
854718219e
Merge pull request #345 from stevenroose/serviceflags
...
Add ServiceFlags type
2019-12-06 21:31:46 +00:00
Andrew Poelstra
65cb18d583
Merge pull request #341 from ccdle12/txin-impl-default
...
Add default trait implementation for TxIn
2019-12-06 21:21:49 +00:00
Steven Roose
3e1e4f92b7
Merge pull request #337 from TheBlueMatt/2019-10-less-deps
...
Drop hex and byteorder (non-test) deps (and disable useless lints)
2019-12-06 15:38:58 +00:00
Steven Roose
1edc436f8f
Add an extensive Display implementation for ServiceFlags
2019-12-05 20:13:45 +00:00
Matt Corallo
824d52fe87
Disable useless lints
2019-12-05 10:41:00 -05:00
Matt Corallo
acb43af981
Drop byteorder dependency
...
Taking an external dependency just to convert ints to byte arrays
is somewhat of a waste, especially when Rust isn't very aggressive
about doing cross-crate LTO.
Note that the latest LLVM pattern-matches this, and while I haven't
tested it, that should mean this means no loss of optimization.
2019-12-05 10:41:00 -05:00
Matt Corallo
f1f7718b6c
Drop (non-test/serde) hex dep in favor of bitcoin_hashes' fn's
2019-12-05 10:40:59 -05:00
Steven Roose
de18e926c1
Use ServiceFlags type in existing API
2019-12-04 23:28:25 +00:00
Steven Roose
fdf4b2f74e
Add ServiceFlags type
2019-12-04 23:28:23 +00:00
Steven Roose
33ba7eaa36
Nit in VersionMessage documentation
2019-11-19 22:58:49 +00:00
Chris Coverdale
0586ed94c4
Add default trait implementation for TxIn
2019-11-17 16:41:14 +00:00
Matt Corallo
fe917765c0
Drop message decode max length to 4_000_000
...
It has been a long time since Bitcoin's maximum network message
length was 32MB, so we should follow suit. This is also an important
DoS limit, so we should limit it as much as possible.
2019-11-06 16:29:21 -05:00
Carl Dong
242ce14cee
Add reject message ( #323 )
...
Add reject message
2019-09-30 14:52:19 +00:00
Dr. Maxim Orlovsky
4b1d4edc14
Improvements to `StreamReader` ( #318 )
...
* Generalizing StreamReader to support arbitrary data structures
* Using Read trait and adding test cases
2019-09-23 08:31:52 +02:00
practicalswift
0b08978af2
Fix incorrect documentation for is_p2pk(...) ( #331 )
2019-09-21 13:33:44 +02:00
Tamas Blummer
1b0e31c233
fixed typo
2019-09-21 13:31:03 +02:00
Tamas Blummer
960e3da75b
remove #repr on RejectReason
...
and typo fix
2019-09-10 20:11:25 +02:00
Tamas Blummer
c93b1ed8ce
add reverse mapping
2019-09-03 19:59:48 +02:00
Tamas Blummer
3266c192b6
add reject message
2019-08-27 13:42:46 +02:00
Tamas Blummer
38d5ae4e3f
enable serde serialization for block and blockheader
2019-08-24 14:26:18 +02:00
Carl Dong
24361dd2f1
Merge pull request #298 from tamasblummer/upgrade_secp_bitcoinconsensus
...
upgrade to secp256k1 0.15 and bitcoinconsensus 0.17
2019-08-23 14:18:05 -04:00
Tamás Blummer
f01568c85a
use lambda instead of a hash map to find spent outputs ( #319 )
...
* use lambda instead of a hash map to find spent outputs
* check for double use of an input
2019-08-23 18:49:31 +02:00
Tamas Blummer
9f3e355c5c
upgrade to secp256k1 0.15 and bitcoinconsensus 0.17
2019-08-21 19:04:40 +02:00
Elichai Turkel
52ff97cddc
Deny unused imports and remove unneeded
2019-08-19 13:29:43 -04:00
Elichai Turkel
747e9ce75c
Pinned serde version and re-export bech32
2019-08-16 16:08:14 -04:00
Steven Roose
c01172780b
Re-export bitcoin_hashes and secp256k1 dependency
2019-08-16 15:52:58 +01:00