MCPcopy Index your code
hub / github.com/HelloZeroNet/ZeroNet / blockr_pushtx

Function blockr_pushtx

src/lib/pybitcointools/bci.py:275–286  ·  view source on GitHub ↗
(tx, network='btc')

Source from the content-addressed store, hash-verified

273
274
275def blockr_pushtx(tx, network='btc'):
276 if network == 'testnet':
277 blockr_url = 'http://tbtc.blockr.io/api/v1/tx/push'
278 elif network == 'btc':
279 blockr_url = 'http://btc.blockr.io/api/v1/tx/push'
280 else:
281 raise Exception(
282 'Unsupported network {0} for blockr_pushtx'.format(network))
283
284 if not re.match('^[0-9a-fA-F]*$', tx):
285 tx = tx.encode('hex')
286 return make_request(blockr_url, '{"hex":"%s"}' % tx)
287
288
289def helloblock_pushtx(tx):

Callers

nothing calls this directly

Calls 2

make_requestFunction · 0.85
formatMethod · 0.80

Tested by

no test coverage detected