func (c *KVCreator) AddKVListOnly(list []*types.KeyValue) *KVCreator {
	if c.autorollback {
		panic("autorollback open, AddKVListOnly not allow")
	}
	for _, kv := range list {
		c.add(kv.Key, kv.Value, false)
	}
	return c
}
AddKVListOnly only add KVList (can't auto rollback)
package dapp
import (
	"fmt"
	"github.com/33cn/chain33/common/db"
	"github.com/33cn/chain33/types"
)
func HeightIndexStr(height, index int64) string {
	v := height*types.MaxTxsPerBlock + index
	return fmt.Sprintf("%018d", v)
}
type KVCreator struct {
	kvs          []*types.KeyValue
	kvdb         db.KV
	autorollback bool
	prefix       []byte
	rollbackkey  []byte
	rollbackkvs  []*types.KeyValue
}
func NewKVCreator(kv db.KV, prefix []byte, rollbackkey []byte) *KVCreator {
	return &KVCreator{
		kvdb:         kv,
		prefix:       prefix,
		rollbackkey:  rollbackkey,
		autorollback: rollbackkey != nil,
	}
}
func (c *KVCreator) addPrefix(key []byte) []byte {
	newkey := append([]byte{}, c.prefix...)
	return append(newkey, key...)
}
func (c *KVCreator) add(key, value []byte, set bool) *KVCreator {
	if c.prefix != nil {
		key = c.addPrefix(key)
	}
	return c.addnoprefix(key, value, set)
}
func (c *KVCreator) addnoprefix(key, value []byte, set bool) *KVCreator {
	if c.autorollback {
		prev, err := c.kvdb.Get(key)
		if err != nil && err != types.ErrNotFound {
			panic(err)
		}
		if value == nil {  
			if err == types.ErrNotFound {
				return c
			}
			rb := &types.KeyValue{Key: key, Value: prev}
			c.rollbackkvs = append(c.rollbackkvs, rb)
		} else {
			if err == types.ErrNotFound {  
				rb := &types.KeyValue{Key: key}
				c.rollbackkvs = append(c.rollbackkvs, rb)
			} else {  
				rb := &types.KeyValue{Key: key, Value: prev}
				c.rollbackkvs = append(c.rollbackkvs, rb)
			}
		}
	}
	c.kvs = append(c.kvs, &types.KeyValue{Key: key, Value: value})
	if set {
		err := c.kvdb.Set(key, value)
		if err != nil {
			panic(err)
		}
	}
	return c
}
func (c *KVCreator) Get(key []byte) ([]byte, error) {
	if c.prefix != nil {
		newkey := c.addPrefix(key)
		return c.kvdb.Get(newkey)
	}
	return c.kvdb.Get(key)
}
func (c *KVCreator) GetNoPrefix(key []byte) ([]byte, error) {
	return c.kvdb.Get(key)
}
func (c *KVCreator) Add(key, value []byte) *KVCreator {
	return c.add(key, value, true)
}
func (c *KVCreator) AddNoPrefix(key, value []byte) *KVCreator {
	return c.addnoprefix(key, value, true)
}
func (c *KVCreator) AddListNoPrefix(list []*types.KeyValue) *KVCreator {
	for _, kv := range list {
		c.addnoprefix(kv.Key, kv.Value, true)
	}
	return c
}
func (c *KVCreator) AddList(list []*types.KeyValue) *KVCreator {
	for _, kv := range list {
		c.add(kv.Key, kv.Value, true)
	}
	return c
}
func (c *KVCreator) AddKVOnly(key, value []byte) *KVCreator {
	if c.autorollback {
		panic("autorollback open, AddKVOnly not allow")
	}
	return c.add(key, value, false)
}