icook / pynode2

A rework of Jeff Garzik's PyNode
MIT License
13 stars 2 forks source link

Abstract storage/retrieval of chaindb #6

Open icook opened 10 years ago

icook commented 10 years ago

Pulling out all the store/retrieve calls to their own datastore class would be helpful in testing.

icook commented 9 years ago

It's also true that several other codebases need the concept of a chain database for handling reorg logic, so if properly abstracted it might belong well upstream.

Possibly the most battle tested one I know of: https://github.com/spesmilo/electrum/blob/11fc93dc4add165b9ad69aee24ab45e81be2859d/lib/blockchain.py

I'm sure there are others that ideas/bits could be used from to make something good enough for a lib.