Commit Graph

33 Commits

Author SHA1 Message Date
Neil Booth
46adf543fc Enforce pycodestyle in server/ 2018-06-10 18:39:12 +09:00
Neil Booth
bc6093a8fe Fully integrate aiorpcX 2018-04-08 10:16:36 +09:00
Neil Booth
790385cf7b UTXO holds a binary hash
Fixes #371
2018-02-14 22:42:48 +08:00
Neil Booth
d075ebba86 Add missing import
Closes #370
2018-02-12 11:44:26 +08:00
Neil Booth
76f4969a98 listunspent methods consider mempool receipts
- Update docs.  Height is 0 for mempool receipts
- Implement mempool.get_utxos() and use it
- Rename mempool.spends to mempool.potential_spends

Closes #365
2018-02-11 23:21:30 +08:00
ThomasV
2d7403f2ef New protocol: (#330)
- add method mempool.get_fee_histogram
- bump protocol version to 1.2
2018-01-20 08:51:38 -04:00
Neil Booth
7126864052 Wait for mempool to sync before starting external servers
Closes #335
2018-01-12 15:26:12 +08:00
Neil Booth
e5b4f5f316 Change read_tx interface of deserializer
Most callers didn't want the hash, so create a separate call
that does both.  Add a new call that returns the TX and its vsize.
2018-01-11 15:45:10 +08:00
Neil Booth
cb33dd115f Clean up client notifications
- mempool informed of new block; it notifies controller synchronously
- controller notifies sessions synchronously
- sessions are notified of new height synchronously.  Any address touch
notifications are returned to the controller and scheduled
asynchronously.

Also, remove a redundant notification of height on initial header
subscriptions - the subscription response gives the current height;
we also used to send a notification as we didn't update our idea
of notified height.
2017-11-27 18:22:32 +09:00
Neil Booth
c764d1de18 Tweak mempool code
Precede 2 private functions with _.  Removed unused arg.
2017-11-27 17:05:31 +09:00
Neil Booth
346385680e Fix listunspent methods to remove mempool spends
Fixes #277
2017-10-12 13:56:46 +09:00
Neil Booth
2ade5fce9c Revert "More logical mempool hash handling"
This reverts commit 87d24f38dc.
2017-07-23 14:55:03 +09:00
Neil Booth
87d24f38dc More logical mempool hash handling
Fixes the issue whereby notifications weren't sent as long as new blocks
kept coming in.  Now a new height notification, with an appropriate mempool
update, is sent after each batch of blocks is processed.
2017-07-19 23:50:44 +09:00
John L. Jegutanis
a4e4f80ad7 Allow custom Daemon and BlockProcessor classes 2017-05-07 14:22:23 +02:00
Neil Booth
f3cdd97ff9 Report unconfirmed parents correctly.
Also, send a notification to the client if the unconfirmed status
of any parent changes.

Fixes #129
2017-02-18 16:10:20 +09:00
Neil Booth
3f35bc0298 More PEP8 stuff 2017-02-18 13:05:26 +09:00
Nathan Marley
a03665696c recommendations from pycodestyle (pep8 style) 2017-02-07 20:12:50 -08:00
Neil Booth
cb0160901f Unify executor and futures logic 2017-01-24 21:25:37 +09:00
Neil Booth
2ad64f6243 Add an RPC call to force a reorg at run-time
This required a large rework block processor and prefetcher
interaction, and led to various cleanups

Closes #103
2017-01-09 17:14:06 +09:00
Neil Booth
852753cb94 Implement deserialization of SegWit transactions
tx_hash needs to be that of the prior serialization, so
need to change internal read_block API.

Bitcoin core 0.13.1 broke backwards compat of the RPC interface.
Closes #92
2017-01-08 10:07:57 +09:00
Neil Booth
2b2909f1c4 Move to hashX
The hashX of a script is the first 11 bytes of its sha256 hash.

Closes #72.
2017-01-07 11:51:01 +09:00
Neil Booth
de201a247f Double fetch size of mempool.
Set testnet genesis hash.
2017-01-07 11:51:01 +09:00
Neil Booth
6a6bbaa07b Tweak mempool logging 2016-12-21 07:28:32 +09:00
Neil Booth
49714a45e6 Mempool tx processing to handle DBError
Fixes #74
2016-12-15 17:22:20 +09:00
Neil Booth
5c80b96d0f Prioritize mempool processing of sent txs
Closes #73
2016-12-15 17:22:19 +09:00
Neil Booth
ac48695db8 daemon: getting height optionally gets mempool
Improve daemon startup log message
2016-12-15 15:38:22 +09:00
Neil Booth
5fe49bb261 Synchronize daemon height and mempool fetching
Cleanup and simplify touched handling and its event, which is
now controlled and owned by the mempool.
The daemon object owns the set of current mempool hashes.
Clean up and simplify the mempool main loop.

Fixes #70.
2016-12-15 12:08:14 +09:00
Neil Booth
e88ea91e89 Defer address notifications whilst processing a block
Partial fix of #70
2016-12-15 12:08:14 +09:00
Neil Booth
444122122e Fix unconfirmed flag
Prepare 0.9.3
2016-12-12 08:21:55 +09:00
Neil Booth
bb17af1906 Fix mempool busy waiting
Prepare 0.9.2
2016-12-12 07:38:40 +09:00
Neil Booth
f600d3bd87 Fix a couple of issues with 0.9.0
Fixes #69
2016-12-12 07:24:00 +09:00
Neil Booth
f1ea36126c Fix typo 2016-12-12 00:42:57 +09:00
Neil Booth
1ef6a4d785 Split mempool out into new file.
Rework mempool handling
2016-12-12 00:05:42 +09:00