diff --git a/sdk/sdk.go b/sdk/sdk.go index 32d10727800b381a78167e6de624405f3143ad2f..59d49b1e356c307149176515f3f2ef74c8ecc13c 100644 --- a/sdk/sdk.go +++ b/sdk/sdk.go @@ -719,7 +719,7 @@ func (s *SDK) newIterator(iteratorFuncName, startKey string, startField string, } // reset writeMap - s.writeMap = make(map[string][]byte, MapSize) + //s.writeMap = make(map[string][]byte, MapSize) createKvIteratorReq := &protogo.DockerVMMessage{ ChainId: s.chainId, @@ -774,7 +774,7 @@ func (s *SDK) NewHistoryKvIterForKey(key, field string) (KeyHistoryKvIter, error } // reset writeMap - s.writeMap = make(map[string][]byte, MapSize) + //s.writeMap = make(map[string][]byte, MapSize) createKeyHistoryKvIterReq := &protogo.DockerVMMessage{ ChainId: s.chainId, diff --git a/sdk/sdk_interface.go b/sdk/sdk_interface.go index 8a13d93c762c941b557114e5b6c06bf1ab54ca29..9e1c0a6f844f254fc75ac63cb88715ba9a1a57dc 100644 --- a/sdk/sdk_interface.go +++ b/sdk/sdk_interface.go @@ -34,7 +34,7 @@ type SDKInterface interface { // @param field: 获取的参数名 // @return1: 获取结果,格式为string // @return2: 获取错误信息 - // Deprecated + // Deprecated: 无法通过返回值来判断state是否存在,建议使用GetStateWithExists GetState(key, field string) (string, error) // GetStateWithExists get [key, field] from chain // @param key: 获取的参数名 @@ -58,7 +58,7 @@ type SDKInterface interface { // @param key: 获取的参数名 // @return1: 获取结果,格式为string // @return2: 获取错误信息 - // Deprecated + // Deprecated: 无法通过返回值来判断state是否存在,建议使用GetStateFromKeyWithExists GetStateFromKey(key string) (string, error) // GetStateFromKeyWithExists get [key] from chain // @param key: 获取的参数名