File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed
Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -250,6 +250,11 @@ impl SyscoinClient {
250250 pub async fn create_or_load_wallet ( & self , wallet_name : & str ) -> Result < ( ) , Box < dyn Error > > {
251251 self . rpc_client . create_or_load_wallet ( wallet_name) . await
252252 }
253+
254+ /// Return the maximum supported blob size
255+ pub fn max_blob_size ( & self ) -> usize {
256+ MAX_BLOB_SIZE
257+ }
253258}
254259
255260/// Mock implementation for testing
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ mod tests {
33 use mockito:: Server ;
44 use serde_json:: json;
55 use tokio;
6- use bitcoin_da_client:: { SyscoinClient } ;
6+ use bitcoin_da_client:: { SyscoinClient , MAX_BLOB_SIZE } ;
77 use hex;
88
99
@@ -281,5 +281,23 @@ mod tests {
281281 assert_eq ! ( result. unwrap( ) , expected_data) ;
282282 }
283283
284+ #[ tokio:: test]
285+ async fn test_max_blob_size ( ) {
286+ // Create a client
287+ let client = SyscoinClient :: new (
288+ "http://dummy-url.com" ,
289+ "user" ,
290+ "password" ,
291+ "http://dummy-poda.com" ,
292+ None
293+ ) . unwrap ( ) ;
294+
295+ // Verify it returns the correct size constant
296+ assert_eq ! ( client. max_blob_size( ) , MAX_BLOB_SIZE ) ;
297+
298+ // Verify it's reasonable (2 MiB)
299+ assert_eq ! ( client. max_blob_size( ) , 2 * 1024 * 1024 ) ;
300+ }
301+
284302}
285303
You can’t perform that action at this time.
0 commit comments