Skip to content

Commit

Permalink
added the block's structure
Browse files Browse the repository at this point in the history
  • Loading branch information
KulwinderSingh07 committed Oct 22, 2023
1 parent 69347f6 commit 3a21e4e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ import (
"os"
"time"

"github.com/KulwinderSingh07/POW-Blockchain/model"
"github.com/gorilla/mux"
"github.com/joho/godotenv"
)

var NewBlock model.Block

var Blockchain []model.Block

func main() {
err := godotenv.Load()
if err != nil {
Expand Down
11 changes: 11 additions & 0 deletions model/block.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package model

type Block struct {
Index int
Timestamp string
Data int
Hash string
PrevHash string
Difficulty int
Nonce string
}

0 comments on commit 3a21e4e

Please sign in to comment.