OSDN Git Service

wip config
[bytom/vapor.git] / asset / asset.go
index 3328ee5..bd18f27 100644 (file)
@@ -8,6 +8,7 @@ import (
 
        "github.com/golang/groupcache/lru"
 
+       cfg "github.com/vapor/config"
        "github.com/vapor/consensus"
        dbm "github.com/vapor/database/leveldb"
        chainjson "github.com/vapor/encoding/json"
@@ -70,9 +71,10 @@ var (
 )
 
 //NewRegistry create new registry
-func NewRegistry(db dbm.DB, chain *protocol.Chain) *Registry {
+func NewRegistry(db dbm.DB, chain *protocol.Chain, config *cfg.Config) *Registry {
        initNativeAsset()
        return &Registry{
+               config:     config,
                db:         db,
                chain:      chain,
                cache:      lru.New(maxAssetCache),
@@ -82,6 +84,8 @@ func NewRegistry(db dbm.DB, chain *protocol.Chain) *Registry {
 
 // Registry tracks and stores all known assets on a blockchain.
 type Registry struct {
+       config *cfg.Config
+
        db    dbm.DB
        chain *protocol.Chain