Commit Graph

226 Commits

Author SHA1 Message Date
SomberNight
4b89b1e270
implement script_num_to_hex 2018-04-27 16:15:43 +02:00
Ben Woosley
53320470f5 Format the transaction window fee rate with 1 decimal place (#4286)
* Fix format_satoshi to properly handle non-integer values

Handling the integer and fraction parts together via string formatting
simplifies the initial composition because the default behavior manages
the - sign, and the incorporation of the fractional part.

* Limit fee rate output to one decimal place

Via a new precision arg

* Introduce format_fee_satoshis and use it for all fee display
2018-04-24 18:54:14 +02:00
SomberNight
44bb1e9993
bitcoin.py: fix op_push
8cbc5c4be4/src/script/script.h (L464)
fdc2bc867b/txscript/scriptbuilder.go (L151)
2018-04-14 16:13:51 +02:00
ghost43
cf88e239d7
fix parsing values in setconfig (#4225) 2018-04-06 18:53:13 +02:00
SomberNight
58273fc841
tests: xpub version bytes 2018-04-01 16:56:17 +02:00
SomberNight
ff57c198b4
fix prev 2018-04-01 16:52:24 +02:00
fivepiece
192288c025 change testnet p2wsh-p2sh prefix to 0x024289ef to reflect Upub (#4210)
* change testnet p2wsh-p2sh prefix to 0x024289ef to reflect Upub

* add testnet p2sh-p2wsh 2of2 multisig test
2018-04-01 16:48:54 +02:00
SomberNight
9de4d19c5a
tests: refactoring in test_wallet_vertical.py 2018-04-01 16:44:59 +02:00
SomberNight
1eae16aa3e
tests: class TestCaseForTestnet 2018-04-01 15:50:24 +02:00
SomberNight
22061b4555 transaction.get_address_from_output_script now handles witness version > 0 2018-03-18 06:18:48 +01:00
SomberNight
a6841cbd5f fix #4099: serialisation of txns with negative version number 2018-03-13 01:02:03 +01:00
SomberNight
e5cba92564 transaction serialization: fix segwit coinbase case.
adjust unit tests so that they would have caught it.
2018-03-06 10:34:52 +01:00
SomberNight
81b6d65764 refactor network constants 2018-03-04 22:10:59 +01:00
SomberNight
a32d27b9d7 make 2fa wallets work on testnet 2018-02-26 18:21:36 +01:00
SomberNight
7a4338ea21 fix tests 2018-02-19 21:16:12 +01:00
ThomasV
344b5e0a23
Merge pull request #3901 from SomberNight/fix_3899
fix #3899; and more aggressively catch exceptions in tx.deserialize()
2018-02-15 09:31:20 +01:00
SomberNight
89b43ee0cb tests: copied valid transactions from bitcoin core unit tests. try to deserialize all. 2018-02-14 15:58:58 +01:00
SomberNight
4b6a3e2e5d fix #3899; and more aggressively catch exceptions in tx.deserialize() 2018-02-14 01:20:38 +01:00
SomberNight
70aa1f1db9 fix #3788 2018-01-29 02:00:43 +01:00
SomberNight
0d1ea09ed1 fix tests 2018-01-16 10:52:41 +01:00
ThomasV
359882d0b1
Merge pull request #3630 from SomberNight/bip84
bip84 for sw seeds
2018-01-11 16:43:34 +01:00
SomberNight
6d88eab005 tests: added 2fa seed case to test_wallet_vertical.py 2018-01-04 22:21:05 +01:00
SomberNight
e3164286d0 implement bip84: bip43 purpose/der path for p2wpkh scripts 2017-12-31 02:20:58 +01:00
SomberNight
9f908c32e3 tests: add missing info in vertical wallet tests 2017-12-13 19:54:39 +01:00
SomberNight
2a3c41b24f coinchooser: "privacy" policy now prefers confirmed coins. removed "priority" policy. 2017-12-11 14:49:53 +01:00
SomberNight
33bb5fee73 tests: testnet addresses 2017-11-22 02:01:47 +01:00
Justin Turner Arthur
857eb4ac1d Remove unused imports. Explicitly import a few deep imports. 2017-11-13 02:28:00 -06:00
SomberNight
0ee18f9837 fix tests 2017-11-06 12:44:36 +01:00
SomberNight
3b26beac9e fix: wallet storage upgrade 13b had incorrect assumptions 2017-11-02 09:49:11 +01:00
SomberNight
c05549c8cd follow-up prev commit: revert "strict checks" for old seeds 2017-10-29 20:04:31 +01:00
SomberNight
d45e13553a old seeds: normalize, and stricter is_old_seed() 2017-10-29 17:34:45 +01:00
SomberNight
aad83a71c8 tests: have bip39 multisig wallet unit test mirror hw wallet behaviour 2017-10-27 19:57:43 +02:00
SomberNight
4a383af872 fix tests 2017-10-27 12:04:26 +02:00
SomberNight
fb47dbb75a tests: transaction.txid() 2017-10-26 00:35:18 +02:00
ThomasV
5665b42999 remove six 2017-10-24 14:04:16 +02:00
SomberNight
aa1289fa5d bitcoin.py AES: implement our own PKCS7 padding 2017-10-22 02:32:58 +02:00
ThomasV
ed6b2d0abf add comment about pyaes issue 2017-10-17 12:55:13 +02:00
SomberNight
d5dcdb01dd follow-up of prev commit: fix travis build (take 2) 2017-10-16 05:23:51 +02:00
SomberNight
3fe2af242e follow-up of prev commit: fix travis build 2017-10-16 05:11:05 +02:00
SomberNight
7ba233f2ab fix: storage upgrade of pre-2.8 imported key wallets, and tests 2017-10-16 04:37:01 +02:00
ThomasV
8d307ce1e8 rm failing test 2017-10-14 16:08:03 +02:00
SomberNight
26f439f34d tests: WalletStorage upgrades 2017-10-14 03:29:08 +02:00
SomberNight
f22f8c614f fix tests 2017-10-13 05:52:58 +02:00
SomberNight
681eb1ccb8 tests: for bitcoin.py, added new ones, and some refactoring for existing
new ones mainly include:
- privkey -> pubkey -> addr conversions
- xprv, xpub operations
2017-10-11 18:46:52 +02:00
ThomasV
73c7fbcc69 Merge pull request #2964 from SomberNight/tests_wallet_keystore_bip39
tests: wallet-keystore integrity (bip39)
2017-10-05 10:10:57 +02:00
SomberNight
f917a565b3 fix tests: message signing 2017-10-04 13:28:00 +02:00
SomberNight
751be88059 tests: wallet-keystore integrity (bip39) 2017-10-03 03:30:40 +02:00
ThomasV
1daecf285d Merge pull request #2950 from SomberNight/tests_wallet_keystore
tests: wallet-keystore integrity (seed->address)
2017-09-29 20:12:42 +02:00
ThomasV
c73819a3d4 fix tests 2017-09-29 17:49:29 +02:00
SomberNight
f3bbb52b91 tests: wallet-keystore integrity (seed->address) 2017-09-29 05:03:22 +02:00
SomberNight
7542bc9e35 tests: message signing 2017-09-27 03:57:49 +02:00
ThomasV
c186dc18d4 fix tests 2017-09-22 09:55:30 +02:00
SomberNight
2fbc70d860 Moving to virtual tx size instead of total tx size. 2017-09-22 09:49:05 +02:00
SomberNight
6e0c2cffd8 replace deprecated assertEquals 2017-09-21 06:07:52 +02:00
SomberNight
653c7acb48 fix bech32 scriptPubKeys (OP_n), and tests 2017-09-16 02:19:26 +02:00
ThomasV
9286deca57 fix test 2017-09-13 11:33:28 +02:00
ThomasV
5f35081bc9 fix tests 2017-08-31 10:25:22 +02:00
Dmitry Sorokin
5be78950ca py3 2017-08-26 08:27:47 +02:00
Kacper Żuk
c6e09a6038 Provide warnings about invalid BIP39 checksum in seed dialog 2017-08-16 15:25:06 +02:00
Johann Bauer
534eaa9bd1 Parse transaction version field
Closes: #2462
2017-05-30 19:28:27 +02:00
Roman Zeyde
de956b7dc1 tests: fix TestTransaction.test_tx_signed testcase 2017-05-08 21:39:57 +03:00
ThomasV
f7212a4732 fix input_script and remove unused method inputs_without_script 2017-03-21 14:33:42 +01:00
ThomasV
c2142ebf26 fix test broken by previous commit 2017-03-21 09:59:48 +01:00
ThomasV
c75e074b88 fix another travis test 2017-03-06 08:44:38 +01:00
ThomasV
9e1931587d fix tests 2017-02-01 10:07:01 +01:00
ThomasV
9ca4e60b84 fix tests 2017-02-01 09:44:25 +01:00
ThomasV
b4d5934da0 testnet: remove failing tests 2017-01-07 18:34:32 +01:00
ThomasV
84f17c2ede fix test 2016-10-16 22:17:52 +02:00
ThomasV
12387c6b62 Merge pull request #1982 from jonathancross/fix-test_transaction
Fixing / commenting out broken tests in test_transaction.py
2016-10-16 15:19:15 +02:00
Jonathan Cross
481a64417e
Fixing final test in test_wallet.py 2016-10-16 13:23:43 +02:00
Jonathan Cross
b503243d0e
Fixing / commenting out tests in test_transaction.py 2016-10-16 13:08:27 +02:00
Jonathan Cross
2c619142f9
Fixing 2 tests in test_mnemonic.py 2016-10-15 19:43:48 +02:00
Jonathan Cross
65f0c25027
Fixing test_bitcoin.py::Test_bitcoin::test_crypto 2016-10-15 19:24:53 +02:00
Jonathan Cross
3de2d9cdbd
Remove broken tests for & classes. 2016-10-15 14:56:31 +02:00
Thomas König
c49202ceaa
fix test_simple_config and test_transaction 2016-08-04 17:21:25 +02:00
ThomasV
774bdcde73 fix test_parse_URI 2016-02-16 10:28:40 +01:00
ThomasV
963dcf0c6b rm test_ripemd 2016-01-26 15:48:34 +01:00
ThomasV
abdb7f8470 fix tests 2016-01-15 18:14:06 +01:00
ThomasV
d867fcc266 update create_main_account in tests 2016-01-07 01:02:44 +01:00
Neil Booth
e1c0298fc2 Write the wallet less often
This should speed up synchronization / restoration of large wallets.
Wallets are written only when they switch to up_to_date state, or
when stop_threads() is called when closing the daemon, or when
a command line command finishes.
2015-12-20 15:47:46 +09:00
ThomasV
f77f63e158 remove failing tests, due to high S in signatures 2015-10-20 13:15:13 +02:00
Neil Booth
12583246ee Fix testcase 2015-09-11 20:17:20 +09:00
Roman Zeyde
a097c47b0b test_transaction: fix test_sweep case 2015-08-31 17:03:59 +03:00
Roman Zeyde
eb66289314 test_transaction: add BCDataStream test case 2015-08-25 15:51:22 +03:00
Roman Zeyde
33b78551a3 test_transaction: add Transaction.sweep() test case 2015-08-25 15:21:44 +03:00
Roman Zeyde
6a7e145053 test_transaction: add test suite for lib.transaction module 2015-08-25 12:05:49 +03:00
Roman Zeyde
3c3d96f69e test_mnemonic: add tests for mnemonics 2015-08-24 17:35:17 +03:00
Roman Zeyde
bb97624de2 test_account: add test case for OldAccount 2015-08-24 10:57:41 +03:00
Roman Zeyde
893849ab39 test_account: add test case for BIP32_Account 2015-08-24 10:57:41 +03:00
Roman Zeyde
a92ca583bd test_interface: fix check_host_name test 2015-08-24 10:02:10 +03:00
Roman Zeyde
ac8e792c58 test_ripemd: add simple test case for ripemd module 2015-08-15 09:52:27 +03:00
Roman Zeyde
fa412c3a86 test_bitcoin: add tests for int packing 2015-08-15 09:41:20 +03:00
Roman Zeyde
175fef2d56 test_bitcoin: add test case for seeds 2015-08-15 09:20:01 +03:00
Roman Zeyde
5fbd7553ed interface: fix check_host_name() pattern matching
The existing pattern matching code:

    val.find('*.') == 0 and name.find(val[1:]) + len(val[1:]) == len(name)

will return True in the following case:

   val = '*.host.com'
   name = 'blah.org'

since string.find() will return -1, len(val[1:]) == 9 and len(name) == 8.
2015-07-26 18:11:30 +03:00
Roman Zeyde
87d3fafa22 util: fix small typo at parse_URI() and update its unittests 2015-07-25 12:41:37 +03:00
ThomasV
a3dd51f476 rm failing test 2015-05-28 15:43:50 +02:00
ThomasV
7becb28ec8 Merge pull request #1246 from kyuupichan/bug_fix
e20dfc unintentionally inverted portable condition
2015-05-25 13:28:42 +02:00
Neil Booth
e63ac88c77 e20dfc unintentionally inverted portable condition
This wasn't noticed because the test was also broken.
2015-05-25 16:59:16 +09:00
Neil Booth
39fe24b4d3 Rename auto_cycle to auto_connect in config
User config is updated if appropriate.
Add tests behaviour is as expected.
Just the one rename-it reference to auto_cycle remains.
2015-05-25 16:18:52 +09:00
Neil Booth
e20dfcd3eb Fix SimpleConfig
SimpleConfig claims to handle configuration options in priority
command line, user config, system config, which makes sense.
In fact it appears it used priority command line, system config,
user config.
Also, from the priority ordering, it would seem correct that a
value should be unmodifiable if and only if it's set on the command
line.  Previously anything in the system config would be unmodifiable.

This patch fixes these and cleans the code up a bit.  I noticed this
whilst attempting to unify the 'auto_cycle' setting.

Fixup tests accordingly.
2015-05-25 15:16:19 +09:00
ThomasV
81be685644 remove tests broken after WalletStorage update 2015-05-11 11:59:39 +02:00
ThomasV
9205a35c22 rm failing test 2015-02-17 15:01:06 +01:00
ThomasV
5262d6ae73 remove wrong test 2015-01-06 18:19:00 +01:00
ThomasV
03e420b1c0 fix tests 2014-09-01 10:49:04 +02:00
ThomasV
f183554446 rm failing tests 2014-08-28 17:48:59 +02:00
ThomasV
c2d175cb60 remove broken tests 2014-08-25 15:55:06 +02:00
ThomasV
ef74ae57ff fix tests 2014-08-25 15:32:21 +02:00
ThomasV
03f4b4c933 fix broken test 2014-08-25 15:11:52 +02:00
ThomasV
9f8e537a7e fix broken test 2014-08-25 14:16:31 +02:00
Chris Glass
73ee95ec9a Removed failing test for now
As discussed on IRC, it might be too early to write this test since the
behavior is not entirely defined yet.
2014-07-09 11:04:49 +02:00
Chris Glass
a9592459ed Add tests to the wallet.py module.
This increases test coverage a lot.
2014-07-09 11:03:44 +02:00
Michael Wozniak
09154fdf20 Shouldn't redo URI encoding 2014-06-30 11:10:50 -04:00
Michael Wozniak
8ad7a5a085 Update tests and fix URI parsing
Update URI parsing for BIP0072 compatability
Update tests for parse_URI
2014-06-30 10:41:12 -04:00
Chris Glass
0ac02bf040 Made all bip32 primitives testnet compatible. 2014-06-27 15:44:43 +02:00
Chris Glass
b2f8d507de Fixed docstrings 2014-06-26 13:24:14 +02:00
Chris Glass
99a31b0c6a Fixes previously introduced bug
The passed in command line options were saved to the user config.
2014-06-26 13:22:02 +02:00
Chris Glass
34f0a65c49 Added more tests for user config parsing. 2014-06-26 11:08:13 +02:00
Chris Glass
ad3640d7a4 Added tests for the system config function. 2014-06-26 10:08:00 +02:00
Chris Glass
5eeae69425 Added more tests for edge cases. 2014-06-25 18:04:37 +02:00
Chris Glass
fff3ed9b77 Added a lot of tests for SimpleConfig
Refactored the SImpleConfig class a lot to make sure the behavior is
always defined.
2014-06-25 17:34:51 +02:00
Chris Glass
af5a0eba33 Added mnemonic to seed tests 2014-06-25 11:21:39 +02:00
Chris Glass
4675ea5321 Added util test file 2014-06-25 10:50:21 +02:00
Chris Glass
bc98223188 Added more bitcoin tests 2014-06-25 10:39:50 +02:00
Chris Glass
9dc814ec8c Made _do_test_crypto private to allow nosetests 2014-06-25 08:45:37 +02:00
Chris Glass
413945435a Added private/public key tests
Including converting from a private key to a public key, and
deriving the primary address from a private key.
2014-06-25 08:27:45 +02:00
Chris Glass
73c33820db Moved bitcoin.py tests to their own file
This allows standard python testing tools to discover and run them.
2014-06-25 07:35:49 +02:00