core/state, core, miner: handle missing root error from state.New
This commit is contained in:
@ -84,7 +84,7 @@ func ExampleGenerateChain() {
|
||||
return
|
||||
}
|
||||
|
||||
state := chainman.State()
|
||||
state, _ := chainman.State()
|
||||
fmt.Printf("last block: #%d\n", chainman.CurrentBlock().Number())
|
||||
fmt.Println("balance of addr1:", state.GetBalance(addr1))
|
||||
fmt.Println("balance of addr2:", state.GetBalance(addr2))
|
||||
|
Reference in New Issue
Block a user