fn store_message(target: AccountIdFor<T>, message: MessageFor<T>) {
		let has_code = ActorInfoOf::<T>::get(&target).code_hash.is_some();

		if has_code {
			ActorInfoOf::<T>::mutate(target, |actor| {
				actor.messages.push(message);
			});
		} else {
			let (imbalance, less) = T::Currency::slash_reserved(&message.source, message.value);
			if less > Zero::zero() {
				panic!("Runtime error: reserved fund is less than expected");
			}
			T::Currency::resolve_creating(&target, imbalance);
		}
	}
/// Store message on destination. If the code is empty, the message should succeed instantly.
Store message on destination. If the code is empty, the message should succeed instantly.
Store message on destination . If the code is empty the message should succeed instantly .
fn store_message(target: AccountIdFor<T>, message: MessageFor<T>) {
		let has_code = ActorInfoOf::<T>::get(&target).code_hash.is_some();
		if has_code {
			ActorInfoOf::<T>::mutate(target, |actor| {
				actor.messages.push(message);
			});
		} else {
			let (imbalance, less) = T::Currency::slash_reserved(&message.source, message.value);
			if less > Zero::zero() {
				panic!("Runtime error: reserved fund is less than expected");
			}
			T::Currency::resolve_creating(&target, imbalance);
		}
	}
fn store_message ( target : AccountIdFor < T > , message : MessageFor < T > ) { let has_code = ActorInfoOf :: < T > :: get ( & target ) . code_hash . is_some ( ) ; if has_code { ActorInfoOf :: < T > :: mutate ( target , | actor | { actor . messages . push ( message ) ; } ) ; } else { let ( imbalance , less ) = T :: Currency :: slash_reserved ( & message . source , message . value ) ; if less > Zero :: zero ( ) { panic ! ( " " ) ; } T :: Currency :: resolve_creating ( & target , imbalance ) ; } }
Store message on destination.
Store message on destination .
target
AccountIdFor<T>
message
MessageFor<T>
target
AccountIdFor<T>
message
MessageFor<T>