Commit 2b2541fd authored by liuyuhang's avatar liuyuhang Committed by vipwzw

mod for del

parent fbd9699d
...@@ -333,7 +333,7 @@ func (kvmMavls *KVmMavlStore) Del(req *types.StoreDel) ([]byte, error) { ...@@ -333,7 +333,7 @@ func (kvmMavls *KVmMavlStore) Del(req *types.StoreDel) ([]byte, error) {
if err != nil { if err != nil {
return hash, err return hash, err
} }
_, err = kvmMavls.KVMVCCStore.Del(req) hash, err = kvmMavls.KVMVCCStore.Del(req)
if err != nil { if err != nil {
return hash, err return hash, err
} }
......
...@@ -238,7 +238,7 @@ func (mvccs *KVMVCCStore) ProcEvent(msg queue.Message) { ...@@ -238,7 +238,7 @@ func (mvccs *KVMVCCStore) ProcEvent(msg queue.Message) {
// Del set kvs to nil with StateHash // Del set kvs to nil with StateHash
func (mvccs *KVMVCCStore) Del(req *types.StoreDel) ([]byte, error) { func (mvccs *KVMVCCStore) Del(req *types.StoreDel) ([]byte, error) {
kvset, err := mvccs.mvcc.DelMVCC(req.StateHash, req.Height, true) kvset, err := mvccs.mvcc.DelMVCC(req.StateHash, req.Height, false)
if err != nil { if err != nil {
kmlog.Error("store kvmvcc del", "err", err) kmlog.Error("store kvmvcc del", "err", err)
return nil, err return nil, err
...@@ -295,12 +295,12 @@ func (mvccs *KVMVCCStore) checkVersion(height int64) ([]*types.KeyValue, error) ...@@ -295,12 +295,12 @@ func (mvccs *KVMVCCStore) checkVersion(height int64) ([]*types.KeyValue, error)
for i := maxVersion; i >= height; i-- { for i := maxVersion; i >= height; i-- {
hash, err := mvccs.mvcc.GetVersionHash(i) hash, err := mvccs.mvcc.GetVersionHash(i)
if err != nil { if err != nil {
kmlog.Warn("store kvmvcc checkVersion GetVersionHash failed", "height", i, "maxVersion", maxVersion) kmlog.Debug("store kvmvcc checkVersion GetVersionHash failed", "height", i, "maxVersion", maxVersion)
continue continue
} }
kvlist, err := mvccs.mvcc.DelMVCC(hash, i, false) kvlist, err := mvccs.mvcc.DelMVCC(hash, i, false)
if err != nil { if err != nil {
kmlog.Warn("store kvmvcc checkVersion DelMVCC failed", "height", i, "err", err) kmlog.Debug("store kvmvcc checkVersion DelMVCC failed", "height", i, "err", err)
continue continue
} }
kvset = append(kvset, kvlist...) kvset = append(kvset, kvlist...)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment