Skip to content

Commit f779ee3

Browse files
committed
refactor: implement receipt traits for horizon
Signed-off-by: Gustavo Inacio <[email protected]>
1 parent abcd7fe commit f779ee3

File tree

5 files changed

+650
-207
lines changed

5 files changed

+650
-207
lines changed

crates/tap-agent/src/agent/sender_allocation.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,7 @@ where
466466
let context = TapAgentContext::new(
467467
pgpool.clone(),
468468
allocation_id,
469+
config.indexer_address,
469470
sender,
470471
escrow_accounts.clone(),
471472
);

crates/tap-agent/src/tap/context.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ pub struct TapAgentContext<T> {
155155
pgpool: PgPool,
156156
allocation_id: Address,
157157
sender: Address,
158+
indexer_address: Address,
158159
escrow_accounts: Receiver<EscrowAccounts>,
159160
/// We use phantom data as a marker since it's
160161
/// only used to define what methods are available
@@ -168,12 +169,14 @@ impl<T: NetworkVersion> TapAgentContext<T> {
168169
pub fn new(
169170
pgpool: PgPool,
170171
allocation_id: Address,
172+
indexer_address: Address,
171173
sender: Address,
172174
escrow_accounts: Receiver<EscrowAccounts>,
173175
) -> Self {
174176
Self {
175177
pgpool,
176178
allocation_id,
179+
indexer_address,
177180
sender,
178181
escrow_accounts,
179182
_phantom: PhantomData,

crates/tap-agent/src/tap/context/rav.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ mod test {
178178
use tokio::sync::watch;
179179

180180
use super::*;
181-
use crate::test::{create_rav, ALLOCATION_ID_0};
181+
use crate::test::{create_rav, ALLOCATION_ID_0, INDEXER};
182182

183183
#[derive(Debug)]
184184
struct TestableRav(SignedRav);
@@ -199,6 +199,7 @@ mod test {
199199
let context = TapAgentContext::new(
200200
pool.clone(),
201201
ALLOCATION_ID_0,
202+
INDEXER.1,
202203
SENDER.1,
203204
watch::channel(EscrowAccounts::default()).1,
204205
);

0 commit comments

Comments
 (0)