Commit 03f0d5cd authored by liuyuhang's avatar liuyuhang Committed by 33cn

加入 kvmvcc_mavl 可配置分叉高度

parent 45f420ce
...@@ -61,6 +61,7 @@ func DisableLog() { ...@@ -61,6 +61,7 @@ func DisableLog() {
func init() { func init() {
drivers.Reg("kvmvccmavl", New) drivers.Reg("kvmvccmavl", New)
types.RegisterDappFork("kvmvccmavl", "ForkKvmvccmavl", types.MaxHeight)
} }
// KVmMavlStore provide kvmvcc and mavl store interface implementation // KVmMavlStore provide kvmvcc and mavl store interface implementation
...@@ -135,7 +136,9 @@ func New(cfg *types.Store, sub []byte) queue.Module { ...@@ -135,7 +136,9 @@ func New(cfg *types.Store, sub []byte) queue.Module {
} }
// 查询是否是删除裁剪版mavl // 查询是否是删除裁剪版mavl
isPrunedMavl = isPrunedMavlDB(bs.GetDB()) isPrunedMavl = isPrunedMavlDB(bs.GetDB())
// 读取fork高度
kvmvccMavlFork = types.GetDappFork("kvmvccmavl", "ForkKvmvccmavl")
delMavlDataHeight = kvmvccMavlFork + 10000
bs.SetChild(kvms) bs.SetChild(kvms)
return kvms return kvms
} }
......
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