Commit Graph

31 Commits

Author SHA1 Message Date
John L. Jegutanis
fa0a58a280 Rename struct pack/unpack to reflect endianess 2018-08-14 01:20:26 +02:00
Neil Booth
54e8b032d1 Implement TX serialization
This will be used in other tests
2018-08-10 18:20:43 +09:00
Neil Booth
450eec89fb Add some utility functions and tests 2018-08-10 18:20:43 +09:00
Neil Booth
1efc8cb8ec Make the merkle cache and read_headers async
read_headers runs in a thread to avoid blocking
2018-08-06 21:49:26 +09:00
Neil Booth
e5b2268387 Fix groestlcoin address parsing
Baesd on erasmospunk's PR #551
2018-08-06 08:39:44 +09:00
John L. Jegutanis
0815ff8e24 Add Decred support (#550)
* Refactor reorg_hashes function

* Add Decred support
2018-08-02 22:20:36 +09:00
Neil Booth
739bb687fc Convert PROTOCOL_MIN, PROTOCOL_MAX to tuples 2018-07-17 10:59:41 +08:00
Neil Booth
382fc5ed44 Improve logging of client version requests 2018-07-16 21:25:50 +08:00
Neil Booth
46d8e0c608 Implement merkle proofs for blockchain.block.header 2018-07-16 16:02:55 +08:00
Neil Booth
d390b38acf Add cache truncation and tests 2018-07-16 12:42:53 +08:00
Neil Booth
26d8026938 Increase merkle cache test coverage to 100% 2018-07-16 09:53:43 +08:00
Neil Booth
4168341857 Implement a markle cache with tests 2018-07-16 09:36:32 +08:00
Neil Booth
3c3a1b7017 Fix thinko in prior
Rename function to prevent similar mistakes in future

Also hash_to_str -> hash_to_hex_str
2018-07-14 21:29:11 +08:00
Neil Booth
af45363eeb Add merkle library with tests 2018-07-14 19:44:10 +08:00
Lex Berezhny
29289004e7 electrumx package (#511)
* moved wallet, server, lib into electrumx main module

* fixed imports and other path references affected by electrumx main package

* fixing formatting to pass the pycodetest on travis
2018-07-10 07:28:04 +08:00
Neil Booth
b993bd8f8e Rename protocol_version_string to version_string 2018-06-05 00:07:16 +09:00
Neil Booth
bc6093a8fe Fully integrate aiorpcX 2018-04-08 10:16:36 +09:00
wilsonmeier
0f4f51d932 Changes for BTG (#409)
* Implemented electrum_header for BTG to include solution (needed for validation on clientside)
Add RPC_PORT for BTG node

* Added node regtest compatibility

* Updated unittests

* Changed chunksize and regtest rpc port

* Changed bits transfer format to decimal

* Add testnet v3 params and corrected coin name
2018-03-13 09:41:04 +08:00
John L. Jegutanis
6add2e5a9b Add custom base58check algorithm (#389) 2018-02-27 21:44:30 +08:00
Neil Booth
c9b9e920f6 Compplete tests for lib/util.py 2017-10-15 18:02:18 +09:00
Sergii Vakula
9303153150 Add support for Emercoin (#284)
* Add parameters for emercoin.

* Add tests for emercoin.

* add block for test new read_header function

* add to daemon https protocol support
2017-10-13 10:12:24 +09:00
Neil Booth
05d6351686 Strip boolean environment variable strings
Update tests
2017-10-05 18:01:45 +09:00
Justin Turner Arthur
0c2e5c6368 Minor optimizations to Bitcoin tx processing (#214)
* Construct unpacking functions for byte format up front to save time
wasted on parsing format string every iteration.

* Store length ahead of time as the overhead adds up.

* Reduce object attribute lookups in hash functions.

* Clean up lib pkg API changes. Unit test new "public" API members.
Underscore prefix for internal hash module funcs. Make bytes.fromhex a
public function.

* Document recent performance findings.
2017-09-09 11:06:46 +07:00
Neil Booth
f4cc1e2926 Fix protocol version reported in server.peers.subscribe
- new library function protocol_version_string() with tests
- remove ad-hoc class functions

Fixes #251
2017-09-08 10:54:56 +09:00
Neil Booth
8f004785af Update tests for COIN changes 2017-09-07 14:26:16 +09:00
Neil Booth
9c25685eb9 Handle client protocol range requests.
Add more tests.
2017-09-06 17:11:18 +09:00
Neil Booth
135ab68f74 Simple protocol negotiation and setting of handlers
It turns out clients pass 0.10 instead of 1.0 as the protocol version.
Distinguish some handlers for 1.0 and 1.1 protocols.
Log protocol version request
Add tests of new library function
2017-09-06 16:24:56 +09:00
Neil Booth
3612b88e2e Permit underscores in hostnames.
Add tests.
2017-07-16 13:58:02 +09:00
Neil Booth
7a77637586 Add comprehensive tests of lib/hash.py 2017-07-10 19:01:03 +09:00
pooler
961936245c Allow multiple P2SH address versions 2017-04-30 09:48:52 +02:00
Neil Booth
fde47d5739 Organise tests 2017-04-06 07:32:56 +09:00