@@ -25,6 +25,7 @@ import (
25
25
"github.com/lightninglabs/taproot-assets/tapscript"
26
26
"github.com/lightninglabs/taproot-assets/universe"
27
27
"github.com/lightninglabs/taproot-assets/universe/supplycommit"
28
+ "github.com/lightninglabs/taproot-assets/universe/supplyverifier"
28
29
"github.com/lightningnetwork/lnd"
29
30
"github.com/lightningnetwork/lnd/clock"
30
31
"github.com/lightningnetwork/lnd/signal"
@@ -624,6 +625,31 @@ func genServerConfig(cfg *Config, cfgLogger btclog.Logger,
624
625
},
625
626
)
626
627
628
+ // Set up the supply verifier, which validates supply commitment leaves
629
+ // published by asset issuers.
630
+ //
631
+ // Initialize the database backend for the supply syncer.
632
+ supplySyncerDb := tapdb .NewTransactionExecutor (
633
+ db , func (tx * sql.Tx ) tapdb.BaseUniverseStore {
634
+ return db .WithTx (tx )
635
+ },
636
+ )
637
+ supplySyncerStore := tapdb .NewSupplySyncerStore (supplySyncerDb )
638
+
639
+ // Create the supply syncer which is used by the supply verifier.
640
+ supplySyncer := supplyverifier .NewSupplySyncer (
641
+ tap .NewRpcSupplySync , supplySyncerStore ,
642
+ )
643
+
644
+ supplyVerifyManager := supplyverifier .NewManager (
645
+ supplyverifier.ManagerCfg {
646
+ Chain : chainBridge ,
647
+ //SupplyCommitView: supplyCommitStore,
648
+ SupplySyncer : supplySyncer ,
649
+ DaemonAdapters : lndFsmDaemonAdapters ,
650
+ },
651
+ )
652
+
627
653
return & tap.Config {
628
654
DebugLevel : cfg .DebugLevel ,
629
655
RuntimeID : runtimeID ,
@@ -678,6 +704,7 @@ func genServerConfig(cfg *Config, cfgLogger btclog.Logger,
678
704
ChainPorter : chainPorter ,
679
705
FsmDaemonAdapters : lndFsmDaemonAdapters ,
680
706
SupplyCommitManager : supplyCommitManager ,
707
+ SupplyVerifyManager : supplyVerifyManager ,
681
708
UniverseArchive : uniArchive ,
682
709
UniverseSyncer : universeSyncer ,
683
710
UniverseFederation : universeFederation ,
0 commit comments