Skip to content

Instantly share code, notes, and snippets.

@locktemp997
locktemp997 / traverser.py
Last active February 27, 2018 19:53
Nano Ledger/LMDB Account parsing (computes balance of account at every send and receive block, identifies send and receive address + amounts, stores to file)
######NOTE#######
#This script was written in python 2.7... no guarantees it works on python 3 without modification.
import lmdb
from pyblake2 import blake2b
import matplotlib.pyplot as plt
#CHANGE THIS TO YOUR DATABASE LOCATION (usually /home/user/RaiBlocks/)
#ALSO!! Python doesn't see the database unless it has extension .mdb
#however your nano-node/wallet won't see it unless it stays named as .ldb
#I suggest creating a symlink as follows: ln -s /PATH/TO/YOUR/DATABASE/data.ldb /PATH/TO/YOUR/DATABASE/data.mdb