Remove the 'address' argument from NewBlockchain, since it's not used anymore

This commit is contained in:
Ivan Kuznetsov 2017-09-17 10:43:23 +07:00
parent 7eda539141
commit cb78220abb
5 changed files with 5 additions and 5 deletions

View File

@ -68,7 +68,7 @@ func CreateBlockchain(address string) *Blockchain {
}
// NewBlockchain creates a new Blockchain with genesis Block
func NewBlockchain(address string) *Blockchain {
func NewBlockchain() *Blockchain {
if dbExists() == false {
fmt.Println("No existing blockchain found. Create one first.")
os.Exit(1)

View File

@ -9,7 +9,7 @@ func (cli *CLI) getBalance(address string) {
if !ValidateAddress(address) {
log.Panic("ERROR: Address is not valid")
}
bc := NewBlockchain(address)
bc := NewBlockchain()
defer bc.db.Close()
balance := 0

View File

@ -6,7 +6,7 @@ import (
)
func (cli *CLI) printChain() {
bc := NewBlockchain("")
bc := NewBlockchain()
defer bc.db.Close()
bci := bc.Iterator()

View File

@ -3,7 +3,7 @@ package main
import "fmt"
func (cli *CLI) reindexUTXO() {
bc := NewBlockchain("")
bc := NewBlockchain()
UTXOSet := UTXOSet{bc}
UTXOSet.Reindex()

View File

@ -13,7 +13,7 @@ func (cli *CLI) send(from, to string, amount int) {
log.Panic("ERROR: Recipient address is not valid")
}
bc := NewBlockchain(from)
bc := NewBlockchain()
defer bc.db.Close()
tx := NewUTXOTransaction(from, to, amount, bc)