mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 10:01:17 +00:00
use DecodeLimit when decoding incoming calls (#1344)
This commit is contained in:
committed by
Bastian Köcher
parent
9b4d44bcfa
commit
814f23584c
@@ -30,7 +30,7 @@ use bp_runtime::{
|
||||
messages::{DispatchFeePayment, MessageDispatchResult},
|
||||
ChainId, Size, StorageProofChecker,
|
||||
};
|
||||
use codec::{Decode, Encode};
|
||||
use codec::{Decode, DecodeLimit, Encode};
|
||||
use frame_support::{
|
||||
traits::{Currency, ExistenceRequirement},
|
||||
weights::{Weight, WeightToFeePolynomial},
|
||||
@@ -521,7 +521,11 @@ pub mod target {
|
||||
for Result<DecodedCall, ()>
|
||||
{
|
||||
fn from(encoded_call: FromBridgedChainEncodedMessageCall<DecodedCall>) -> Self {
|
||||
DecodedCall::decode(&mut &encoded_call.encoded_call[..]).map_err(drop)
|
||||
DecodedCall::decode_with_depth_limit(
|
||||
sp_api::MAX_EXTRINSIC_DEPTH,
|
||||
&mut &encoded_call.encoded_call[..],
|
||||
)
|
||||
.map_err(drop)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user