Jean Pierre Dudey
77c185d9ec
Fix modules documentation title.
...
Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
2018-08-08 17:38:50 -04:00
Andrew Poelstra
45c699f005
Merge pull request #112 from TheBlueMatt/2018-07-p2wsh-name
...
Clarify to_v0_p2wsh docs a bit further
2018-07-28 18:28:00 +00:00
Matt Corallo
3686cd7201
Clarify to_v0_p2wsh docs a bit further
2018-07-26 15:13:44 -04:00
Savil Srivastava
933dcaeb82
[code hygiene] remove deprecated rustc-serialize
...
Addresses #96 .
Turns out it was being used for hex encoding/decoding, so replaced that with the `hex` crate.
i chose to import the `decode` method as:
```
use hex::decode as hex_decode
```
so that it is clear to the reader what is being decoded when it is called. "decode" is such a generic sounding function name that it would get confusing otherwise.
2018-07-26 09:49:15 -07:00
Carl Dong
db76a63669
Fix to_v0_p2wsh docs
2018-07-25 17:11:27 -07:00
Tamas Blummer
caeadb42be
check if output is OP_RETURN
2018-06-23 14:49:55 +02:00
Igor Aleksanov
14a920ab7d
Added method to convert target from Uint256 to compact form ( #86 )
...
Renamed method for getting compact from u256
Removed unnecessary asserts from convert function
2018-06-12 20:58:25 +02:00
Roman Zeyde
69ea2a760b
Fix 2 small typos in comments
2018-06-09 22:27:40 +03:00
Andrew Poelstra
62d080afc7
Merge pull request #83 from tamasblummer/is_coinbase
...
add is_coin_base
2018-06-04 18:46:03 +00:00
Tamas Blummer
3921899c65
add is_coin_base
...
add data access as copy
2018-06-01 21:39:51 +02:00
Igor Aleksanov
34e228c699
Added regtest
...
Completed regtest integration to the code
Added tests for regtest
Get rid of panics
2018-05-29 12:21:41 +03:00
Roman Zeyde
44d0ad90e9
block: fix a small typo in comment
2018-04-11 12:23:15 +03:00
Matt Corallo
8aa6253a3b
Correct consensus verify args, fix tests to catch error in travis
2018-04-02 15:38:43 -04:00
Matt Corallo
bfe889904a
Fix whitespace (s/\t/ /g)
2018-04-02 14:58:25 -04:00
Matt Corallo
3793b2859a
Add a Transaction.get_weight() method, check it in fuzzing
2018-04-02 12:23:05 -04:00
Matt Corallo
a33f00621b
Move witness inside of TxIn.
...
This is a rather large breaking API change, but is significantly
more sensible. In the "do not allow internal representation to
represent an invalid state" category, this ensures that witness
cannot have an length other than the number of inputs. Further,
it reduces vec propagation, which may help performance in some
cases by reducing allocs. Fianlly, this just makes more sense (tm).
Witness are a per-input field like the scriptSig, placing them
outside of the TxIn is just where they are serialized, not where
they logically belong.
2018-03-26 10:25:33 -04:00
Matt Corallo
6826d8f35c
Stub out Sha2 calls when fuzzing to mask all but the first byte
2018-03-21 18:44:10 -04:00
Tamas Blummer
1a87244b2b
Implement Segwit addresses
2018-03-20 18:26:51 +01:00
Tamas Blummer
755fb454eb
integration with bitcoinconsenus
2018-03-12 17:17:16 +01:00
Andrew Poelstra
21f2baf58e
remove script interpreter
2018-03-09 20:30:11 +00:00
Tamas Blummer
77ce6f18d0
Moved blockchain and patricia_tree to rust-memblocks
2018-03-09 17:22:31 +01:00
Andrew Poelstra
7dcca9157b
Merge branch 'master' into is_on_main_chain_public2
2018-03-09 15:09:21 +00:00
Tamas Blummer
5e510366cf
is_on_main_chain is a very useful function upstream, make it public
2018-03-03 18:15:05 +01:00
Tamas Blummer
50a9d0f51f
add get_best_tip_height to blokchain
2018-02-28 20:24:35 +01:00
Andrew Poelstra
047c0c149d
remove `num` crate dependency
2018-02-18 15:21:13 +00:00
Andrew Poelstra
71bce7b067
Merge pull request #44 from tamasblummer/add_difficulty2
...
Add difficulty calculation
2018-02-18 14:59:36 +00:00
Tamas Blummer
3efe511cc6
add difficulty calculation
2018-02-11 19:58:26 +01:00
Andrew Poelstra
f233fcac61
util: add `bip143` module to create BIP143 signature hashes
2018-01-15 17:54:32 +00:00
Andrew Poelstra
b3644b7b6d
add constants for OP_CLTV and OP_CSV
2017-12-21 01:10:00 +00:00
Andrew Poelstra
406160a386
transaction: add txid() function that does the right thing for segwit/nonsegwit
...
With Segwit transactions `bitcoin_hash()` is no longer sufficient to get a txid.
2017-12-09 19:52:09 +00:00
Andrew Poelstra
c691d0e382
util: add Sha256dEncoder to allow streaming data into a hash
...
This is needed to for a sane BIP143 implementation. Should be exactly equivalent to
serializing data into a vector then hashing that vector for all types.
2017-12-06 16:50:47 +00:00
Andrew Poelstra
e5f109221e
script: add `to_p2wsh()` and `is_p2swsh()` functions to allow easy segwit output computation
2017-12-06 15:39:37 +00:00
Andrew Poelstra
c341e21dc6
remove unnecessary `mut` that nightly rustc has learned to detect
2017-10-06 19:56:50 +00:00
Andrew Poelstra
46439710d9
script: add `is_p2pkh()` function
2017-10-06 19:15:30 +00:00
Andrew Poelstra
af10b153be
segwit: add transaction/block serialization support for BIP141/BIP144; bump to 0.8
...
Do not yet support new sighash type
2016-08-24 16:24:55 +00:00
Andrew Poelstra
93f103bdb5
script: fix broken push_int in script::Builder
2016-07-14 15:15:34 +00:00
Andrew Poelstra
698a23e32d
script: fix Debug impl bugs in Script, PUSHDATA1 not displayed correctly
2016-06-24 00:20:49 +00:00
Andrew Poelstra
1e47019221
cargo-clippy cleanups
2016-06-21 14:35:27 +00:00
Andrew Poelstra
50b3e90912
Rename Transaction::scripthash to Transaction::signature_hash
...
Yes, this is a major release because I misspelled the name of a function :)
2016-06-13 21:25:47 +00:00
Andrew Poelstra
38b2cacf35
Add support for computing transaction sighashes, which is needed for signing
2016-06-12 18:25:23 +00:00
Andrew Poelstra
220775015e
[BREAKING CHANGE] [v0.5 -> v0.6] Move nasty script stuff into a feature-gated module
2016-06-12 00:36:46 +00:00
Andrew Poelstra
6ccd157775
Add `into_vec` method to Script
2016-06-02 23:47:29 +00:00
Andrew Poelstra
35832e3da0
Remove some unused trait imports
2016-05-27 18:36:42 +00:00
Andrew Poelstra
30904b67a7
Derive Eq and friends for script::Instruction
2016-05-04 14:03:58 +00:00
Andrew Poelstra
f18157e774
Minor code changes for new rustc/clippy. No effects. Update minor version number
2016-02-18 19:44:29 +00:00
Andrew Poelstra
5f308887c9
Fix test added for serde transaction roundtrip
2016-02-18 18:02:04 +00:00
Andrew Poelstra
92c3b2459c
script: fix macro for future rustc changes
2016-02-18 17:56:51 +00:00
Andrew Poelstra
b88d04f0bc
Add serde impls for all Transaction types
...
Bump version number; introduce rust-jsonrpc dependency
2016-02-10 03:37:24 +00:00
Andrew Poelstra
56b7e7d3f4
Add ntxid support
2015-12-21 11:07:37 -06:00
Andrew Poelstra
16f5878a03
Add a bunch of Ord/PartialOrd impls for stuff
2015-12-20 15:38:02 -06:00