expose include_data to expert devs for store requests fn

This commit is contained in:
Ivan Folgueira Bande 2024-12-22 15:31:27 +01:00
parent eb4286ba71
commit 40e908feca
No known key found for this signature in database
GPG Key ID: 3C117481F89E24A7
2 changed files with 4 additions and 2 deletions

View File

@ -135,7 +135,8 @@ impl App<Initialized> {
impl App<Running> {
async fn retrieve_history(&mut self) {
let messages = self.waku.store_query(None, vec![TOY_CHAT_CONTENT_TOPIC.clone()], STORE_NODE).await.unwrap();
let include_data = true;
let messages = self.waku.store_query(None, vec![TOY_CHAT_CONTENT_TOPIC.clone()], STORE_NODE, include_data).await.unwrap();
let messages:Vec<_> = messages
.iter()
.map(|store_resp_msg| {

View File

@ -192,6 +192,7 @@ impl WakuNodeHandle<Running> {
pubsub_topic: Option<PubsubTopic>,
content_topics: Vec<WakuContentTopic>,
peer_addr: &str,
include_data: bool, // is true, resp contains payload, etc. Only msg_hashes otherwise
) -> Result<Vec<StoreWakuMessageResponse>> {
let one_day_in_secs = 60 * 60 * 24;
let time_start = (Duration::from_secs(Utc::now().timestamp() as u64)
@ -206,8 +207,8 @@ impl WakuNodeHandle<Running> {
let request_id = Uuid::new_v4();
let response = store::waku_store_query(
&self.ctx,
true, // include_data
request_id.to_string(),
include_data,
pubsub_topic.clone(),
content_topics.clone(),
Some(time_start), // time_start