From 338a9c621bc3bc76cb9ac45713dd26e1fd4d1476 Mon Sep 17 00:00:00 2001 From: hyeonLewis Date: Mon, 16 Dec 2024 09:03:57 +0900 Subject: [PATCH] Use errors instead of fmt --- blockchain/state/statedb.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/blockchain/state/statedb.go b/blockchain/state/statedb.go index 6d2445dcc..f91611329 100644 --- a/blockchain/state/statedb.go +++ b/blockchain/state/statedb.go @@ -24,6 +24,7 @@ package state import ( "bytes" + "errors" "fmt" "math/big" "sort" @@ -1182,8 +1183,8 @@ func (s *StateDB) GetTxHash() common.Hash { } var ( - errNotExistingAddress = fmt.Errorf("there is no account corresponding to the given address") - errNotProgramAccount = fmt.Errorf("given address is not a program account") + errNotExistingAddress = errors.New("there is no account corresponding to the given address") + errNotProgramAccount = errors.New("given address is not a program account") ) func (s *StateDB) GetContractStorageRoot(contractAddr common.Address) (common.ExtHash, error) {