2023-03-30
1804
#blockchain#go
Solomon Esenyi
84441
Mar 30, 2023 â‹… 6 min read

How to build a blockchain with Go

Solomon Esenyi Python/Golang developer and Technical Writer with a passion for open-source, cryptography, and serverless technologies.

Recent posts:

Integrating Django Templates With React For Dynamic Webpages

Integrating Django templates with React for dynamic webpages

Create a dynamic demo blog site using Django and React to demonstrate Django’s server-side functionalities and React’s interactive UI.

Kayode Adeniyi
Apr 18, 2024 â‹… 7 min read
Using Aoi Js To Build A Bot For Discord

Using aoi.js to build a bot on Discord

Explore how the aoi.js library makes it easy to create Discord bots with useful functionalities for frontend applications.

Rahul Padalkar
Apr 17, 2024 â‹… 9 min read
Web Components Adoption Guide: Overview, Examples, And Alternatives

Web Components adoption guide: Overview, examples, and alternatives

Evaluate Web Components, a set of standards that allow you to create custom HTML tags for more reusable, manageable code.

Elijah Asaolu
Apr 16, 2024 â‹… 11 min read
Using Aws Lambda And Aws Cloudfront To Optimize Image Handling

Using AWS Lambda and CloudFront to optimize image handling

Leverage services like AWS Lambda, CloudFront, and S3 to handle images more effectively, optimizing performance and providing a better UX.

Nitish Sharma
Apr 12, 2024 â‹… 12 min read
View all posts

3 Replies to "How to build a blockchain with Go"

  1. With the above code, I’m getting prevHash : 30 for the first block while printing the block data. It should be empty right?

    I’m using the below function to print the data of the block :

    func printBlockInformation(block Block) {
    fmt.Printf(“\ttime: %s\n”, block.timestamp.String())
    fmt.Printf(“\tprevHash: %x\n”, block.previousHash)
    fmt.Printf(“\tHash: %x\n”, block.hash)

    }

    Can someone please help?

  2. What is the point of the proof of work step? Why can’t you simply calculate the hash once, and be done? Why do you have to waste CPU cycles on a loop, calculating millions of hashes just to prove that you did work? What is the practical point of the proof of work step?

Leave a Reply