mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 19:11:02 +00:00
Revert dispatch-results (#2048)
* Revert "Reintroduce msg dispatch status reporting (#2027)" This reverts commit 38bb051e3d778ee2f5e9451f89cf479a71fd68f8. * post-revert fix
This commit is contained in:
committed by
Bastian Köcher
parent
c2e68484de
commit
512d43fabe
@@ -101,7 +101,6 @@ impl<T: Config<I>, I: 'static> MaxEncodedLen for StoredInboundLaneData<T, I> {
|
||||
fn max_encoded_len() -> usize {
|
||||
InboundLaneData::<T::InboundRelayer>::encoded_size_hint(
|
||||
T::MaxUnrewardedRelayerEntriesAtInboundLane::get() as usize,
|
||||
T::MaxUnconfirmedMessagesAtInboundLane::get() as usize,
|
||||
)
|
||||
.unwrap_or(usize::MAX)
|
||||
}
|
||||
@@ -155,9 +154,6 @@ impl<S: InboundLaneStorage> InboundLane<S> {
|
||||
// overlap.
|
||||
match data.relayers.front_mut() {
|
||||
Some(entry) if entry.messages.begin < new_confirmed_nonce => {
|
||||
entry.messages.dispatch_results = entry.messages.dispatch_results
|
||||
[(new_confirmed_nonce + 1 - entry.messages.begin) as usize..]
|
||||
.to_bitvec();
|
||||
entry.messages.begin = new_confirmed_nonce + 1;
|
||||
},
|
||||
_ => {},
|
||||
@@ -174,7 +170,7 @@ impl<S: InboundLaneStorage> InboundLane<S> {
|
||||
relayer_at_this_chain: &AccountId,
|
||||
nonce: MessageNonce,
|
||||
message_data: DispatchMessageData<Dispatch::DispatchPayload>,
|
||||
) -> ReceivalResult<Dispatch::DispatchError> {
|
||||
) -> ReceivalResult<Dispatch::DispatchLevelResult> {
|
||||
let mut data = self.storage.data();
|
||||
let is_correct_message = nonce == data.last_delivered_nonce() + 1;
|
||||
if !is_correct_message {
|
||||
@@ -202,20 +198,19 @@ impl<S: InboundLaneStorage> InboundLane<S> {
|
||||
);
|
||||
|
||||
// now let's update inbound lane storage
|
||||
match data.relayers.back_mut() {
|
||||
let push_new = match data.relayers.back_mut() {
|
||||
Some(entry) if entry.relayer == *relayer_at_bridged_chain => {
|
||||
entry.messages.note_dispatched_message(dispatch_result.dispatch_result.is_ok());
|
||||
},
|
||||
_ => {
|
||||
data.relayers.push_back(UnrewardedRelayer {
|
||||
relayer: relayer_at_bridged_chain.clone(),
|
||||
messages: DeliveredMessages::new(
|
||||
nonce,
|
||||
dispatch_result.dispatch_result.is_ok(),
|
||||
),
|
||||
});
|
||||
entry.messages.note_dispatched_message();
|
||||
false
|
||||
},
|
||||
_ => true,
|
||||
};
|
||||
if push_new {
|
||||
data.relayers.push_back(UnrewardedRelayer {
|
||||
relayer: (*relayer_at_bridged_chain).clone(),
|
||||
messages: DeliveredMessages::new(nonce),
|
||||
});
|
||||
}
|
||||
self.storage.set_data(data);
|
||||
|
||||
ReceivalResult::Dispatched(dispatch_result)
|
||||
|
||||
Reference in New Issue
Block a user