File tree Expand file tree Collapse file tree 5 files changed +6
-2
lines changed Expand file tree Collapse file tree 5 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ recently_closed_allocation_buffer_secs = 3600
99syncing_interval_secs = 60
1010
1111[service ]
12+ ipfs_url = " https://api.thegraph.com/ipfs/"
1213serve_network_subgraph = false
1314serve_escrow_subgraph = false
1415host_and_port = " 0.0.0.0:7600"
@@ -26,4 +27,3 @@ trigger_value_divisor = 10
2627timestamp_buffer_secs = 60
2728request_timeout_secs = 5
2829max_receipts_per_request = 10000
29-
Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ serve_escrow_subgraph = false
102102# serve_auth_token = "token"
103103# # allow queries using this token
104104# free_query_auth_token = "i-am-authorized-right?"
105+ ipfs_url = " https://api.thegraph.com/ipfs/"
105106
106107
107108[service .tap ]
Original file line number Diff line number Diff line change @@ -353,6 +353,7 @@ pub struct BlockchainConfig {
353353#[ derive( Debug , Deserialize ) ]
354354#[ cfg_attr( test, derive( PartialEq ) ) ]
355355pub struct ServiceConfig {
356+ pub ipfs_url : Url ,
356357 pub serve_network_subgraph : bool ,
357358 pub serve_escrow_subgraph : bool ,
358359 pub serve_auth_token : Option < String > ,
Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ pub async fn run() -> anyhow::Result<()> {
102102
103103 let host_and_port = config. service . host_and_port ;
104104 let indexer_address = config. indexer . indexer_address ;
105+ let ipfs_url = config. service . ipfs_url . clone ( ) ;
105106
106107 let router = ServiceRouter :: builder ( )
107108 . database ( database. clone ( ) )
@@ -135,7 +136,7 @@ pub async fn run() -> anyhow::Result<()> {
135136 . expect ( "invalid dips host port" ) ;
136137
137138 let ipfs_fetcher: Arc < dyn IpfsFetcher > =
138- Arc :: new ( IpfsClient :: new ( "https://api.thegraph.com/ipfs/" ) . unwrap ( ) ) ;
139+ Arc :: new ( IpfsClient :: new ( ipfs_url . as_str ( ) ) . unwrap ( ) ) ;
139140
140141 // TODO: Try to re-use the same watcher for both DIPS and TAP
141142 let watcher = escrow_accounts_v1 (
Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ async fn full_integration_test(database: PgPool) {
8484 max_receipt_value_grt : NonZeroGRT :: new ( 1000000000000 ) . unwrap ( ) ,
8585 } ,
8686 free_query_auth_token : None ,
87+ ipfs_url : "http://localhost:5001" . parse ( ) . unwrap ( ) ,
8788 } )
8889 . blockchain ( BlockchainConfig {
8990 chain_id : indexer_config:: TheGraphChainId :: Test ,
You can’t perform that action at this time.
0 commit comments