Skip to content

Commit d08b3e3

Browse files
authored
refactor: implement receipt traits for horizon (#609)
* refactor: implement receipt traits for horizon Signed-off-by: Gustavo Inacio <[email protected]> * docs: explain why use a trait over a match Signed-off-by: Gustavo Inacio <[email protected]> --------- Signed-off-by: Gustavo Inacio <[email protected]>
1 parent d0731e3 commit d08b3e3

11 files changed

+871
-207
lines changed

.sqlx/query-10bd83671f30f7bc2096e9158be60023577bbbdbab7a83788204d066bdd9fec5.json

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-5f0c42c9a92a446d37b2971175df6ed0cd31da6b57918a2d600ef90adce1345d.json

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-6ce2133a20924d5098fa2e27f897e871955e9eb8a0a6f8b9f23a3f38597793f6.json

Lines changed: 62 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-8b904cecdd8e9c5dd0cd8a0dbc2e8a19c2197f08d576e5cbf978e39432bb3d5a.json

Lines changed: 30 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-b94514ce9abc8be15ba3b5a67f33ead0d83e409210ce5e711932bcb32888f2bf.json

Lines changed: 75 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-cd279b9b74e3efdb79ece086b1e6713d2fc766e6553568df8c6ab1d39a5282f6.json

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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)