Skip to content

Instantly share code, notes, and snippets.

View tonicebrian's full-sized avatar

Toni Cebrián tonicebrian

View GitHub Profile
CREATE INDEX ON :Block(height);
CREATE INDEX ON :Transaction(hash);
CREATE INDEX ON :Output(tx_hash, output_index);
CREATE INDEX ON :Address(address_string);
LOAD CSV WITH HEADERS FROM "http://storage.googleapis.com/bitcoin-neo4j-etl/blocks.csv" AS row
MERGE (b:Block {height: toInt(row.number)})
ON CREATE SET
b.hash = row.hash,
b.size = toInt(row.size),