On a general note, I'm wondering why methods like database::spends() and database::history() just dereference the pointer without checking if the database is initialized? When calling fetch_history on a block_chain object obtained from a full_node this will cause a segmentation fault 0.o