SYMBOL='BTC',
CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Bitcoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Bitcoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.bitcoin'), 'bitcoin.conf'),
BLOCK_EXPLORER_URL_PREFIX='http://blockexplorer.com/block/',
+ ADDRESS_EXPLORER_URL_PREFIX='http://blockexplorer.com/address/',
SANE_MAX_TARGET=2**256//2**32 - 1,
),
bitcoin_testnet=math.Object(
SYMBOL='tBTC',
CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Bitcoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Bitcoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.bitcoin'), 'bitcoin.conf'),
BLOCK_EXPLORER_URL_PREFIX='http://blockexplorer.com/testnet/block/',
+ ADDRESS_EXPLORER_URL_PREFIX='http://blockexplorer.com/testnet/address/',
SANE_MAX_TARGET=2**256//2**32 - 1,
),
SYMBOL='NMC',
CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Namecoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Namecoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.namecoin'), 'bitcoin.conf'),
BLOCK_EXPLORER_URL_PREFIX='http://explorer.dot-bit.org/b/',
+ ADDRESS_EXPLORER_URL_PREFIX='http://explorer.dot-bit.org/a/',
SANE_MAX_TARGET=2**256//2**32 - 1,
),
namecoin_testnet=math.Object(
SYMBOL='tNMC',
CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Namecoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Namecoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.namecoin'), 'bitcoin.conf'),
BLOCK_EXPLORER_URL_PREFIX='http://testnet.explorer.dot-bit.org/b/',
+ ADDRESS_EXPLORER_URL_PREFIX='http://testnet.explorer.dot-bit.org/a/',
SANE_MAX_TARGET=2**256//2**32 - 1,
),
SYMBOL='LTC',
CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Litecoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Litecoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.litecoin'), 'litecoin.conf'),
BLOCK_EXPLORER_URL_PREFIX='http://abe.liteco.in/block/',
+ ADDRESS_EXPLORER_URL_PREFIX='http://abe.liteco.in/address/',
SANE_MAX_TARGET=2**256//1000 - 1,
),
litecoin_testnet=math.Object(
SYMBOL='tLTC',
CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Litecoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Litecoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.litecoin'), 'litecoin.conf'),
BLOCK_EXPLORER_URL_PREFIX='http://nonexistent-litecoin-testnet-explorer/block/',
+ ADDRESS_EXPLORER_URL_PREFIX='http://nonexistent-litecoin-testnet-explorer/address/',
SANE_MAX_TARGET=2**256//1000 - 1,
),
)
new_root.putChild('tails', WebInterface(lambda: ['%064x' % x for t in tracker.tails for x in tracker.reverse_shares.get(t, set())]))
new_root.putChild('verified_tails', WebInterface(lambda: ['%064x' % x for t in tracker.verified.tails for x in tracker.verified.reverse_shares.get(t, set())]))
new_root.putChild('best_share_hash', WebInterface(lambda: '%064x' % current_work.value['best_share_hash']))
- new_root.putChild('currency_info', WebInterface(lambda: dict(symbol=net.PARENT.SYMBOL, block_explorer_url_prefix=net.PARENT.BLOCK_EXPLORER_URL_PREFIX)))
+ new_root.putChild('currency_info', WebInterface(lambda: dict(
+ symbol=net.PARENT.SYMBOL,
+ block_explorer_url_prefix=net.PARENT.BLOCK_EXPLORER_URL_PREFIX,
+ address_explorer_url_prefix=net.PARENT.ADDRESS_EXPLORER_URL_PREFIX,
+ )))
class Explorer(resource.Resource):
def render_GET(self, request):
var arr = []; for(var i in pays) arr.push(i); arr.sort(function(a, b){return pays[b] - pays[a]});
var tr = d3.select('#payouts').selectAll().data(arr).enter().append('tr');
- tr.append('td').append('a').text(function(addr){return addr}).attr('href', function(addr){return currency_info.block_explorer_url_prefix + addr});
+ tr.append('td').append('a').text(function(addr){return addr}).attr('href', function(addr){return currency_info.address_explorer_url_prefix + addr});
tr.append('td').text(function(addr){return pays[addr]});
var total_tr = d3.select('#payouts').append('tr');