Skip to content

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

Open
P-A-R-U-S wants to merge 3 commits into
masterfrom
part_4
Open

Method NewBlockChain do not require use db.Update and can be replaced with db.View.#33
P-A-R-U-S wants to merge 3 commits into
masterfrom
part_4

Conversation

@P-A-R-U-S

Copy link
Copy Markdown

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

Anmilover commented Feb 25, 2022 via email

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants