Update cli.go

fix nodeaddess empty when send coins.
This commit is contained in:
Dean 2023-06-14 22:00:45 +08:00 committed by GitHub
parent ff408351a2
commit 62e040e9f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

1
cli.go
View File

@ -39,6 +39,7 @@ func (cli *CLI) Run() {
fmt.Printf("NODE_ID env. var is not set!") fmt.Printf("NODE_ID env. var is not set!")
os.Exit(1) os.Exit(1)
} }
nodeAddress = fmt.Sprintf("localhost:%s", nodeID)
getBalanceCmd := flag.NewFlagSet("getbalance", flag.ExitOnError) getBalanceCmd := flag.NewFlagSet("getbalance", flag.ExitOnError)
createBlockchainCmd := flag.NewFlagSet("createblockchain", flag.ExitOnError) createBlockchainCmd := flag.NewFlagSet("createblockchain", flag.ExitOnError)