Commit Graph

680 Commits

Author SHA1 Message Date
Neil Booth
bc6093a8fe Fully integrate aiorpcX 2018-04-08 10:16:36 +09:00
Neil Booth
e69b1d930f Convert PeerSession to use aiorpcX 2018-04-05 15:28:46 +09:00
John L. Jegutanis
90f28314d2 Add DROP_CLIENT env variable (#432)
This will disconnect any client based on their version string,
using a regular expression.
Useful for dropping buggy/unsupported clients.
2018-04-05 06:49:56 +09:00
Neil Booth
c1ba211d43 Remove code appropriate for future aiorpcX
Closes #428
2018-03-26 21:20:35 +09:00
Neil Booth
a2635f4df9 Bump reported version to 1.3.1 2018-03-26 17:27:48 +09:00
Neil Booth
81141eb390 Proxy detection improvements
- don't detect in a loop.  Only detect at startup, and later if
  needed and 15 minutes has passed since the last attempt
2018-03-26 17:27:47 +09:00
Neil Booth
c11ad5d189 Bump to aiorpcX version 0.4.4
Update peers.py to not pass local_addr to proxy
2018-03-13 15:32:49 +08:00
Roman Zeyde
19565a136d Fix small typo in server/db.py (#412) 2018-03-12 17:15:55 +08:00
Neil Booth
74bc80ffbd Revert "Log from Peer Manager directly"
This reverts commit d2e6f7d75b.
2018-03-12 08:25:03 +08:00
Neil Booth
d2e6f7d75b Log from Peer Manager directly 2018-03-10 13:06:37 +08:00
Neil Booth
80fc334449 Switch to aiorpcX for SOCKS proxying. 2018-03-10 13:06:37 +08:00
Neil Booth
ebc83b4028 Import peers in main_loop
Also only if peer discovery is enabled.  It's less confusing
that way.
2018-03-10 09:48:04 +08:00
Neil Booth
5e3ab51e5e Suffix a + to version post-release 2018-03-09 08:05:13 +08:00
Neil Booth
b5e97b6d37 Log supported protocol versions 2018-03-09 08:01:31 +08:00
Neil Booth
bfca87d13a Release 1.3 2018-03-08 16:43:16 +08:00
Neil Booth
47f65ffda2 Add raw header subscriptions. 2018-03-08 16:14:03 +08:00
Neil Booth
bab8d9f915 Add server.ping RPC call 2018-03-08 14:28:57 +08:00
dax
cf49b737d3 Enable verbose mode in blockchain.transaction.get (#397)
getrawtransaction: optional verbose mode

Update PROTOCOL.rst docs
2018-03-07 08:59:06 +08:00
Neil Booth
521227c2b8 coin is on the controller, unfortunately 2018-03-06 23:02:39 +08:00
Neil Booth
62220f64db Remove dead code left over from prior 2018-03-06 22:25:54 +08:00
Neil Booth
5109990ea4 Add blockchain.block.headers RPC call 2018-03-03 18:39:24 +08:00
Neil Booth
7823129526 Clarify truncation behaviour of get_chunk in docs 2018-03-03 18:39:24 +08:00
Neil Booth
49ee008346 Relax the constraints on read_headers
They were really for fs_block_hashes; that still enforces
the full constraint.  Simplifies get_chunk.
2018-03-03 18:39:24 +08:00
Neil Booth
7a989ad4e7 Remove get_chunk restriction 2018-02-22 15:35:13 +08: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
Neil Booth
22c75a6216 Remove deprecated "with await" syntax 2018-02-11 22:10:07 +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
TheLazieR Yip
e61490a5ba Remove support for Electrum-Dash 2.6.4 (#347) 2018-01-11 18:50:04 +08:00
TheLazieR Yip
a6e466e37e Update DashElectrumX follow notification process of ElectrumX. (#346) 2018-01-11 18:05:18 +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
b01139bb93 Don't iterate over mempool_statuses
Fixes #321
2017-11-28 18:56:36 +09:00
Neil Booth
ddf65fa9c2 Don't send notifications to LocalRPC sessions
Fixes #320
2017-11-28 18:51:49 +09: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
bcb36e0cb4 Prepare 1.2.1 2017-11-27 16:36:31 +09:00
Neil Booth
35dd1f6199 Remove IRC support 2017-11-27 15:05:42 +09:00
Neil Booth
72fce87088 Put server_features() on the environment object
Fixes #302
2017-11-16 20:14:49 +00:00
SomberNight
e2b15d7fe1 fix: estimatesmartfee when there is no feerate from daemon (#306) 2017-11-04 00:21:46 +07:00
SomberNight
8293da1e10 use estimatesmartfee for fee estimation (#300)
* use estimatesmartfee for fee estimation, in case of BitcoinSegwit

* use estimatesmartfee in daemon if available

* daemon._is_rpc_available() now catches DaemonError instead of using HTTP error code
2017-11-01 15:30:27 +07:00
Neil Booth
cf99f733d9 Remove the get_proof RPC.
The client will get an unknown method error message instead.
2017-10-15 16:27:10 +09:00
Neil Booth
74cb4c2f45 Require Python 3.6 2017-10-14 11:51:11 +09:00
Neil Booth
9bf220dec6 Widen min and max columns 2017-10-12 14:19:28 +09:00
Neil Booth
e039ba4b15 Prepare 1.2 2017-10-12 14:11:11 +09:00
Neil Booth
56d03625f6 Keep P2PK scripts separate from P2PKH scripts
This makes the DB incompatible with prior versions,
so the DB version is bumped.
2017-10-12 14:02:22 +09:00
Neil Booth
1cf084fb69 Prepare 1.1.2 2017-10-12 14:02:22 +09:00
Neil Booth
346385680e Fix listunspent methods to remove mempool spends
Fixes #277
2017-10-12 13:56:46 +09:00
Neil Booth
81947d796b Enhance PEER_DISCOVERY environment variable
It is now tri-state - ON, OFF or SELF.

Fixes #287
2017-10-11 13:54:13 +09:00