Jeiwan / blockchain_go

A simplified blockchain implementation in Golang
4.14k stars 1.17k forks source link

Method NewBlockChain do not require use db.Update and can be replaced with db.View. #33

Open P-A-R-U-S opened 6 years ago

P-A-R-U-S commented 6 years ago

Following part in NewBlockChain

err = db.Update(func(tx *bolt.Tx) error { ....... }) can be replace with View, because there is update operation and we jus getting last hash from database.

err = db.View(func(tx *bolt.Tx) error { ....... })

Anmilover commented 2 years ago

您好,邮件已查收。Anmi、