Commit c1824a57 authored by harrylee's avatar harrylee Committed by vipwzw

fix a bug for evm exec_delete_local

parent a2e5909e
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
package executor package executor
import ( import (
"bytes"
"github.com/33cn/chain33/types" "github.com/33cn/chain33/types"
evmtypes "github.com/33cn/plugin/plugin/dapp/evm/types" evmtypes "github.com/33cn/plugin/plugin/dapp/evm/types"
) )
...@@ -29,7 +30,15 @@ func (evm *EVMExecutor) ExecDelLocal(tx *types.Transaction, receipt *types.Recei ...@@ -29,7 +30,15 @@ func (evm *EVMExecutor) ExecDelLocal(tx *types.Transaction, receipt *types.Recei
if err != nil { if err != nil {
return set, err return set, err
} }
set.KV = append(set.KV, &types.KeyValue{Key: []byte(changeItem.Key), Value: changeItem.PreValue}) //转换老的log的key-> 新的key
key := []byte(changeItem.Key)
if bytes.HasPrefix(key, []byte("mavl-")) {
key[0] = 'L'
key[1] = 'O'
key[2] = 'D'
key[3] = 'B'
}
set.KV = append(set.KV, &types.KeyValue{Key: []byte(key), Value: changeItem.PreValue})
} }
} }
} }
......
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