Commit graph

39 commits

Author SHA1 Message Date
Daniel Cousens
9db67bb3b1 Cleanup for #540 (#551)
* Txbuilder: early exit as soon as possible

* Txbuilder: prefer function declaration over variable

* TxBuilder: extract extractFromOutputScript

* TxBuilder: extract buildFromInputData
2016-04-08 12:23:32 +10:00
Ruben de Vries
b601f50c70 fixed another test where TX was signed before locktime was set 2016-01-28 16:11:49 +11:00
Daniel Cousens
6c0745adce TxBuilder: add setLockTime 2016-01-28 00:55:44 +11:00
Ruben de Vries
ccec864785 locktime and version were set too late in test scenario and not included when signing (the test scenario). 2016-01-26 17:13:07 +01:00
Daniel Cousens
74e7d1edbc tests: add further tests for #404 2015-09-08 22:48:54 +10:00
Daniel Cousens
0f9af83aa0 tests: add 2-of-3 multisig fixture 2015-09-08 21:45:43 +10:00
Daniel Cousens
d85df4a6d6 TransactionBuilder: remove use of assert 2015-08-14 10:56:31 +10:00
Daniel Cousens
7a6936674e tests: add explicit test for inconsistent network exception 2015-08-07 17:01:31 +10:00
Daniel Cousens
6443e4c2b6 ECPair: support strict network syntax 2015-08-07 16:36:10 +10:00
Daniel Cousens
4c8b0f38ea replace ECKey/ECPubKey with ECPair 2015-03-19 13:33:28 +11:00
Daniel Cousens
69eb58c783 tests: ignore txHexIncomplete, instead check scriptSig after each signature 2015-03-11 12:37:11 +11:00
Daniel Cousens
e80f4803d9 tests: refactor multisig test construction 2015-03-11 12:12:50 +11:00
Daniel Cousens
7cd60aaba3 tests: remove unnecessary script tests from TxBuilder 2015-03-11 11:33:25 +11:00
Ruben de Vries
745eace950 add tests for various PS2H multisig signing scenarios
redid P2SH multisig tests to use fixtures
2015-03-05 10:21:40 +01:00
Daniel Cousens
cdcbb2ccb4 tests: fix inconsistent key compression 2015-03-03 10:43:37 +11:00
Daniel Cousens
c79fecffa3 tests: add failing test for transaction builder multisig 2015-03-03 09:54:55 +11:00
Daniel Cousens
3a15f0c6ba tests: add scriptHash(pubKeyHash) test fixture 2015-03-02 18:32:24 +11:00
Daniel Cousens
f87ac58df0 tests: add reverse order multisig 2-of-2 2015-02-23 11:37:33 +11:00
Daniel Cousens
d68eb496a9 tests: use fffff... unless txHash is actually useful 2015-02-15 21:12:24 +11:00
Daniel Cousens
3a371fccec TxBuilder: remove initialized field from signature inputs 2015-02-13 13:18:28 +11:00
Daniel Cousens
d3af28e37e tests: fix TxBuilder fixtures to be consistent w/ compression 2015-02-13 13:18:28 +11:00
Daniel Cousens
1fde0a401d tests: move inconsistent hashType/redeemScript test 2015-02-13 13:18:28 +11:00
Daniel Cousens
ebbe1278a0 tests: add non-standard input fixture 2015-02-13 13:18:28 +11:00
Daniel Cousens
f0c4a76325 tests: add scriptHash(pubKey) test fixture 2015-02-13 13:18:28 +11:00
Daniel Cousens
3f53b528a8 tests: reduce setup-code duplication 2015-02-13 13:18:28 +11:00
Daniel Cousens
95911c5dde tests: consistent test data names 2015-02-13 13:18:28 +11:00
Daniel Cousens
4c9fd6010e TxBuilder: fix failing test for non-standard/multisig inputs
Instead of failing in `fromTransaction`, TxBuilder will now only fail in
`sign` if you attempt to sign a non-standard input.

Transactions with non-standard inputs can only be built with
buildIncomplete() (for now).
2015-02-13 13:18:26 +11:00
Daniel Cousens
b048627a59 tests: move TxBuilder.sign tests to fixtures 2015-02-13 13:18:00 +11:00
Daniel Cousens
396e4d4235 tests: add [failing] test for nulldata signing 2015-02-13 13:18:00 +11:00
Daniel Cousens
35fa86c1f9 tests: add [failing] raw multisig fixture for TxBuilder 2015-02-13 13:18:00 +11:00
Daniel Cousens
cbf8c6f932 tests: format JSON consistently 2015-01-23 16:37:10 +11:00
Daniel Cousens
a529b3fa0b TxBuilder: copy version/locktime in fromTransaction 2015-01-23 16:35:09 +11:00
Daniel Cousens
1d0fd3e9a4 TxBuilder: add more failing cases and error handling 2014-08-31 14:43:35 +10:00
Daniel Cousens
1c744cfa5a TxBuilder: add failing test for non-zero vin inputs 2014-08-30 12:09:31 +10:00
Daniel Cousens
f9fed3c815 TxBuilder: adds fromTransaction impl. and basic tests 2014-08-18 08:54:46 +10:00
Daniel Cousens
31ea956e8e TxBuilder: add invalid nulldata case 2014-08-18 08:54:45 +10:00
Daniel Cousens
d0ac9b405a tests: add TxBuilder pubKey test fixture 2014-08-18 08:54:45 +10:00
Daniel Cousens
36b225a3df TxBuilder: use data fixtures for invalid tests 2014-08-18 08:54:45 +10:00
Daniel Cousens
bcbcd58964 TxBuilder: Initial commit and tests 2014-08-18 08:54:45 +10:00