From 54b6c07b6c45e5b89a08a3b7919d55591d24a7cf Mon Sep 17 00:00:00 2001 From: Ivan Kuznetsov Date: Tue, 29 Aug 2017 16:27:33 +0700 Subject: [PATCH] Add an information print when there's no blockchain --- blockchain.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/blockchain.go b/blockchain.go index 5c6b119..edc29df 100644 --- a/blockchain.go +++ b/blockchain.go @@ -1,6 +1,7 @@ package main import ( + "fmt" "log" "github.com/boltdb/bolt" @@ -96,6 +97,7 @@ func NewBlockchain() *Blockchain { b := tx.Bucket([]byte(blocksBucket)) if b == nil { + fmt.Println("No existing blockchain found. Creating a new one...") genesis := NewGenesisBlock() b, err := tx.CreateBucket([]byte(blocksBucket))