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
Based on #215 by JustinTArthur.
- Accept EVENT_LOOP_POLICY of uvloop
- Move initilisation from electrumx_server to controller
- SocksProxy now requires a loop
- Update tests
* Fix formatting
* Refactor daemons
Replaced FujiDaemon with FakeEstimateFeeDaemon that simulates estimate
fee calls and provide the same functionality.
Removed the parameter False for LegacyRPCDaemon's getblock RPC call as
it is not needed.
* Fix Crown coin P2SH_VERBYTES and add REORG_LIMIT
Explicitely set the local IP for outgoing connections, if we're listening
on only one Hostname or IP (of a multi-IP machine). This makes sure our
peers see our outgoing connections coming from the same IP that we're
listening on when we have a specific HOST= configured.
For machines with more than one IP this avoids source-destination
mismatch errors when advertizing our peer. Resolveskyuupichan/electrumx#225
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.
Add support for daemons that don't have the new 'getblock' RPC call that
returns the block in hex, the workaround is to manually recreate the block
bytes. The recreated block bytes may not be the exact ones as in the
underlying blockchain but it is good enough for our indexing purposes.
$SERVER_VER will return the version number (eg: 1.0.10)
$SERVER_SUBVERSION will return the full version string (eg: ElectrumX 1.0.10)
$VERSION is kept for legacy which is the same as $SERVER_SUBVERSION
$SERVER_VER will return the version number (eg: 1.0.10)
$SERVER_SUBVERSION will return the full version string (eg: ElectrumX 1.0.10)
$VERSION is kept for legacy which is the same as $SERVER_SUBVERSION