Skip to content

Commit 52f2fef

Browse files
committed
tapcfg: instantiate policyStore and inject in the rfq manager
1 parent 98d6b72 commit 52f2fef

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tapcfg/server.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,13 @@ func genServerConfig(cfg *Config, cfgLogger btclog.Logger,
114114
lndservices.WithPsbtMaxFeeRatio(cfg.Wallet.PsbtMaxFeeRatio),
115115
)
116116

117+
rfqPolicyDB := tapdb.NewTransactionExecutor(
118+
db, func(tx *sql.Tx) tapdb.RfqPolicyStore {
119+
return db.WithTx(tx)
120+
},
121+
)
122+
policyStore := tapdb.NewPersistedPolicyStore(rfqPolicyDB)
123+
117124
// Create a block header cache with default configuration.
118125
headerCache, err := lndservices.NewBlockHeaderCache(
119126
lndservices.DefaultBlockHeaderCacheConfig(),
@@ -509,6 +516,7 @@ func genServerConfig(cfg *Config, cfgLogger btclog.Logger,
509516
SendPriceHint: rfqCfg.SendPriceHint,
510517
SendPeerId: rfqCfg.PriceOracleSendPeerId,
511518
NoOpHTLCs: cfg.Channel.NoopHTLCs,
519+
PolicyStore: policyStore,
512520
ErrChan: mainErrChan,
513521
})
514522
if err != nil {

0 commit comments

Comments
 (0)