Fix bugs in WorldVirtualState implementation
base field of worldvirtualstate would be initialized after realization
of itself. So, it can't used on initialization. But Database()
method is used on initialize stage, so, it should use real world
state to get a database.
@@ -431,7 +431,7 @@ func (wvs *worldVirtualState) NodeCacheEnabled() bool {
}
func (wvs *worldVirtualState) Database() db.Database {
- return wvs.base.Database()
+ return wvs.real.Database()
}
func (wvs *worldVirtualState) Ensure() {
