pallet-octopus-appchain
pallet-octopus-appchain copied to clipboard
Add a limit to the cross-chain messages submitted
see snowfork:
134 /// Submit message on the outbound channel
135 pub fn submit(who: &T::AccountId, target: H160, payload: &[u8]) -> DispatchResult {
140 ensure!(
141 MessageQueue::decode_len().unwrap_or(0) < T::MaxMessagesPerCommit::get(),
142 Error::<T>::QueueSizeLimitReached,
143 );
144 ensure!(
145 payload.len() <= T::MaxMessagePayloadSize::get(),
146 Error::<T>::PayloadTooLarge,
147 );