We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 02bbe21 commit d7fa02dCopy full SHA for d7fa02d
program/rust/src/accounts/price.rs
@@ -17,7 +17,10 @@ use {
17
TwapMessage,
18
},
19
solana_program::pubkey::Pubkey,
20
- std::mem::size_of,
+ std::{
21
+ mem::size_of,
22
+ u16,
23
+ },
24
};
25
26
/// Pythnet-specific PriceAccount implementation
@@ -349,7 +352,7 @@ impl PythOracleSerialize for PublisherStakeCapsMessage {
349
352
result.extend_from_slice(&self.publish_time.to_be_bytes());
350
353
result.extend_from_slice(
351
354
&u16::try_from(self.caps.as_ref().len())
- .unwrap()
355
+ .unwrap_or(u16::MAX)
356
.to_be_bytes(),
357
);
358
0 commit comments