deleted py-scanner; messes up DB

This commit is contained in:
timlucmiptev 2020-10-08 10:38:06 +03:00 committed by ixv
parent cd8772c292
commit cfd0b11992
3 changed files with 0 additions and 41 deletions

View File

@ -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

View File

@ -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