Skip to content

Commit

Permalink
refactor: implement receipt traits for horizon
Browse files Browse the repository at this point in the history
Signed-off-by: Gustavo Inacio <gustavo@semiotic.ai>
  • Loading branch information
gusinacio committed Feb 7, 2025
1 parent abcd7fe commit b76373c
Show file tree
Hide file tree
Showing 11 changed files with 867 additions and 207 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/tap-agent/src/agent/sender_allocation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ where
let context = TapAgentContext::new(
pgpool.clone(),
allocation_id,
config.indexer_address,
sender,
escrow_accounts.clone(),
);
Expand Down
3 changes: 3 additions & 0 deletions crates/tap-agent/src/tap/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ pub struct TapAgentContext<T> {
pgpool: PgPool,
allocation_id: Address,
sender: Address,
indexer_address: Address,
escrow_accounts: Receiver<EscrowAccounts>,
/// We use phantom data as a marker since it's
/// only used to define what methods are available
Expand All @@ -168,12 +169,14 @@ impl<T: NetworkVersion> TapAgentContext<T> {
pub fn new(
pgpool: PgPool,
allocation_id: Address,
indexer_address: Address,
sender: Address,
escrow_accounts: Receiver<EscrowAccounts>,
) -> Self {
Self {
pgpool,
allocation_id,
indexer_address,
sender,
escrow_accounts,
_phantom: PhantomData,
Expand Down
3 changes: 2 additions & 1 deletion crates/tap-agent/src/tap/context/rav.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ mod test {
use tokio::sync::watch;

use super::*;
use crate::test::{create_rav, ALLOCATION_ID_0};
use crate::test::{create_rav, ALLOCATION_ID_0, INDEXER};

#[derive(Debug)]
struct TestableRav(SignedRav);
Expand All @@ -199,6 +199,7 @@ mod test {
let context = TapAgentContext::new(
pool.clone(),
ALLOCATION_ID_0,
INDEXER.1,
SENDER.1,
watch::channel(EscrowAccounts::default()).1,
);
Expand Down
Loading

0 comments on commit b76373c

Please sign in to comment.