@@ -3,14 +3,14 @@ use anyhow::Result;
33use async_trait:: async_trait;
44use backon:: { ExponentialBuilder , Retryable } ;
55use rdkafka:: producer:: { FutureProducer , FutureRecord } ;
6- use tips_core:: Bundle ;
6+ use tips_core:: BundleWithMetadata ;
77use tokio:: time:: Duration ;
88use tracing:: { error, info} ;
99
1010/// A queue to buffer transactions
1111#[ async_trait]
1212pub trait QueuePublisher : Send + Sync {
13- async fn publish ( & self , bundle : & Bundle , bundle_hash : & B256 ) -> Result < ( ) > ;
13+ async fn publish ( & self , bundle : & BundleWithMetadata , bundle_hash : & B256 ) -> Result < ( ) > ;
1414}
1515
1616/// A queue to buffer transactions
@@ -27,7 +27,7 @@ impl KafkaQueuePublisher {
2727
2828#[ async_trait]
2929impl QueuePublisher for KafkaQueuePublisher {
30- async fn publish ( & self , bundle : & Bundle , bundle_hash : & B256 ) -> Result < ( ) > {
30+ async fn publish ( & self , bundle : & BundleWithMetadata , bundle_hash : & B256 ) -> Result < ( ) > {
3131 let key = bundle_hash. to_string ( ) ;
3232 let payload = serde_json:: to_vec ( & bundle) ?;
3333
@@ -75,7 +75,7 @@ impl QueuePublisher for KafkaQueuePublisher {
7575mod tests {
7676 use super :: * ;
7777 use rdkafka:: config:: ClientConfig ;
78- use tips_core:: BundleWithMetadata ;
78+ use tips_core:: { Bundle , BundleWithMetadata } ;
7979 use tokio:: time:: { Duration , Instant } ;
8080
8181 fn create_test_bundle ( ) -> Bundle {
@@ -97,7 +97,7 @@ mod tests {
9797 let bundle_hash = bundle_with_metadata. bundle_hash ( ) ;
9898
9999 let start = Instant :: now ( ) ;
100- let result = publisher. publish ( & bundle , & bundle_hash) . await ;
100+ let result = publisher. publish ( & bundle_with_metadata , & bundle_hash) . await ;
101101 let elapsed = start. elapsed ( ) ;
102102
103103 // the backoff tries at minimum 100ms, so verify we tried at least once
0 commit comments