Skip to content

Commit

Permalink
Remove field
Browse files Browse the repository at this point in the history
  • Loading branch information
mqxf committed Nov 7, 2023
1 parent ca13acc commit a296321
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
9 changes: 2 additions & 7 deletions core/src/message/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ pub struct ContextStore {
outgoing: BTreeMap<u32, Option<Payload>>,
reply: Option<Payload>,
initialized: BTreeSet<ProgramId>,
awaken: BTreeSet<MessageId>,
reply_sent: bool,
reservation_nonce: ReservationNonce,
system_reservation: Option<u64>,
Expand Down Expand Up @@ -484,13 +483,9 @@ impl MessageContext {

/// Wake message by it's message id.
pub fn wake(&mut self, waker_id: MessageId, delay: u32) -> Result<(), Error> {
if self.store.awaken.insert(waker_id) {
self.outcome.awakening.push((waker_id, delay));
self.outcome.awakening.push((waker_id, delay));

Ok(())
} else {
Err(Error::DuplicateWaking)
}
Ok(())
}

/// Create deposit to handle future reply on message id was sent.
Expand Down
2 changes: 0 additions & 2 deletions pallets/gear/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -947,9 +947,7 @@ fn reply_deposit_gstd_async() {
});
}

// TODO (#2763): resolve panic caused by "duplicate" wake in message A
#[test]
#[should_panic]
fn pseudo_duplicate_wake() {
use demo_constructor::{Calls, Scheme};

Expand Down

0 comments on commit a296321

Please sign in to comment.