hypnopump / pysimplechain

A Python Implementation of a simple blockchain
MIT License
187 stars 48 forks source link

Printing actual message written and saved. #8

Closed maqueen closed 6 years ago

maqueen commented 6 years ago

This is great as a nice, simple example how a simple chain works. I tried a bunch of different code combinations, but I could get actual message to display when displaying block or chain, always just the number of messages or an error.

Any ideas?

hypnopump commented 6 years ago

okay, if you want to display every message in a block when displaying the whole chain (option n=4), you should add the following code snippet right after line 180: for m in b.messages: print(m.data) this should display the text for every message in the block. Hope it resolved the issue!