(network='btc')
| 305 | |
| 306 | |
| 307 | def last_block_height(network='btc'): |
| 308 | if network == 'testnet': |
| 309 | data = make_request('http://tbtc.blockr.io/api/v1/block/info/last') |
| 310 | jsonobj = json.loads(data.decode("utf-8")) |
| 311 | return jsonobj["data"]["nb"] |
| 312 | |
| 313 | data = make_request('https://blockchain.info/latestblock') |
| 314 | jsonobj = json.loads(data.decode("utf-8")) |
| 315 | return jsonobj["height"] |
| 316 | |
| 317 | |
| 318 | # Gets a specific transaction |
nothing calls this directly
no test coverage detected