mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-14 08:34:25 +03:00
deleted py-scanner; messes up DB
This commit is contained in:
parent
cd8772c292
commit
cfd0b11992
@ -1,10 +0,0 @@
|
||||
FROM python:3.9
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y libleveldb-dev
|
||||
WORKDIR /code
|
||||
COPY src/requirements.txt .
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
ADD src .
|
||||
RUN python setup.py install
|
@ -1,30 +0,0 @@
|
||||
# py-scanner
|
||||
|
||||
Scans the BTC blockchain's raw txs. Faster than RPC'ing.
|
||||
Uses [Python Blockchain Parser](https://github.com/alecalve/python-bitcoin-blockchain-parser)
|
||||
|
||||
## Usage
|
||||
1. Build the Docker image
|
||||
```
|
||||
docker image build --rm -t py-scanner .`docker image build --rm -t py-scanner .
|
||||
```
|
||||
2. Run it (opens Python CLI)
|
||||
```
|
||||
BTC="/Volumes/sandisk/BTC"
|
||||
docker container run -v $BTC:/btc -it py-scanner
|
||||
# OR add `bash` to get a CLI
|
||||
docker container run -v $BTC:/btc -it py-scanner bash
|
||||
```
|
||||
3. Run commands. The below takes a couple seconds to index, but then it blows through blocks.
|
||||
```
|
||||
import os
|
||||
from blockchain_parser.blockchain import Blockchain
|
||||
path='/btc/blocks'
|
||||
blockchain = Blockchain(os.path.expanduser(path))
|
||||
|
||||
for block in blockchain.get_ordered_blocks(os.path.expanduser('/btc/blocks/index'), start=651000, end=651300):
|
||||
print("height=%d block=%s" % (block.height, block.hash))
|
||||
|
||||
for block in blockchain.get_ordered_blocks(os.path.expanduser('/btc/blocks/index'), start=651000, end=651001):
|
||||
print(block.transactions)
|
||||
```
|
@ -1 +0,0 @@
|
||||
Subproject commit 7a9e15c236b10d2a6dff5e696801c0641af72628
|
Loading…
Reference in New Issue
Block a user