func (l *LocalDB) StartTx() {
	l.keys = nil
}
StartTx reset state db keys
package executor
import (
	"github.com/33cn/chain33/client"
	"github.com/33cn/chain33/common/db"
	"github.com/33cn/chain33/queue"
	"github.com/33cn/chain33/types"
)
type LocalDB struct {
	cache        map[string][]byte
	txcache      map[string][]byte
	keys         []string
	intx         bool
	hasbegin     bool
	kvs          []*types.KeyValue
	txid         *types.Int64
	client       queue.Client
	api          client.QueueProtocolAPI
	disableread  bool
	disablewrite bool
}
func NewLocalDB(cli queue.Client, readOnly bool) db.KVDB {
	api, err := client.New(cli, nil)
	if err != nil {
		panic(err)
	}
	txid, err := api.LocalNew(readOnly)
	if err != nil {
		panic(err)
	}
	return &LocalDB{
		cache:  make(map[string][]byte),
		txid:   txid,
		client: cli,
		api:    api,
	}
}
func (l *LocalDB) DisableRead() {
	l.disableread = true
}
func (l *LocalDB) DisableWrite() {
	l.disablewrite = true
}
func (l *LocalDB) EnableRead() {
	l.disableread = false
}
func (l *LocalDB) EnableWrite() {
	l.disablewrite = false
}
func (l *LocalDB) resetTx() {
	l.intx = false
	l.txcache = nil
	l.keys = nil
	l.hasbegin = false
}