Browse Source

Merge branch 'release-0.7.15'

master 0.7.15
Neil Booth 8 years ago
parent
commit
056419f847
  1. 13
      RELEASE-NOTES
  2. 8
      server/daemon.py
  3. 12
      server/protocol.py
  4. 2
      server/version.py

13
RELEASE-NOTES

@ -1,3 +1,16 @@
version 0.7.15
--------------
The following meta variables in your banner file are now replaced in
addition to $VERSION described in the notes to 0.17.11. If you type
getnetworkinfo in your daemon's debug console you will see what they
are based on:
- $DAEMON_VERSION is replaced with the daemon's version as a dot-separated
string. For example "0.12.1".
- $DAEMON_SUBVERSION is replaced with the daemon's user agent string.
For example, "/BitcoinUnlimited:0.12.1(EB16; AD4)/".
version 0.7.14
--------------

8
server/daemon.py

@ -156,11 +156,15 @@ class Daemon(util.LoggedClass):
'''Return the fee estimate for the given parameters.'''
return await self._send_single('estimatefee', params)
async def getnetworkinfo(self):
'''Return the result of the 'getnetworkinfo' RPC call.'''
return await self._send_single('getnetworkinfo')
async def relayfee(self):
'''The minimum fee a low-priority tx must pay in order to be accepted
to the daemon's memory pool.'''
net_info = await self._send_single('getnetworkinfo')
return net_info['relayfee']
network_info = await self.getnetworkinfo()
return network_info['relayfee']
async def getrawtransaction(self, hex_hash):
'''Return the serialized raw transaction with the given hash.'''

12
server/protocol.py

@ -889,7 +889,17 @@ class ElectrumX(Session):
self.logger.error('reading banner file {}: {}'
.format(self.env.banner_file, e))
else:
banner = banner.replace('$VERSION', VERSION)
network_info = await self.daemon.getnetworkinfo()
version = network_info['version']
major, minor = divmod(version, 1000000)
minor, revision = divmod(minor, 10000)
revision //= 100
version = '{:d}.{:d}.{:d}'.format(major, minor, revision)
subversion = network_info['subversion']
banner = (banner.replace('$VERSION', VERSION)
.replace('$DAEMON_VERSION', version)
.replace('$DAEMON_SUBVERSION', subversion))
return banner
async def donation_address(self, params):

2
server/version.py

@ -1 +1 @@
VERSION = "ElectrumX 0.7.14"
VERSION = "ElectrumX 0.7.15"

Loading…
Cancel
Save