public void HandleMessage(ZeroPacket message) { switch (message.PacketType) { case AaMessageCode.UserOperations: Metrics.UserOperationsMessagesReceived++; UserOperationsMessage uopMsg = Deserialize <UserOperationsMessage>(message.Content); ReportIn(uopMsg); Handle(uopMsg); break; } }
private void Handle(UserOperationsMessage uopMsg) { IList <UserOperation> userOperations = uopMsg.UserOperations; for (int i = 0; i < userOperations.Count; i++) { UserOperation uop = userOperations[i]; ResultWrapper <Keccak> result = _userOperationPool.AddUserOperation(uop); if (Logger.IsTrace) { Logger.Trace($"{_session.Node:c} sent {uop.Hash} uop and it was {result}"); } } }
private void Handle(UserOperationsMessage uopMsg) { IList <UserOperationWithEntryPoint> userOperations = uopMsg.UserOperationsWithEntryPoint; for (int i = 0; i < userOperations.Count; i++) { UserOperationWithEntryPoint uop = userOperations[i]; if (_userOperationPools.TryGetValue(uop.EntryPoint, out IUserOperationPool? pool)) { ResultWrapper <Keccak> result = pool.AddUserOperation(uop.UserOperation); if (Logger.IsTrace) { Logger.Trace($"{_session.Node:c} sent {uop.UserOperation.Hash} uop to pool for entryPoint {uop.EntryPoint} and it was {result}"); } } else { if (Logger.IsTrace) { Logger.Trace($"{_session.Node:c} could not sent {uop.UserOperation.Hash} uop to pool for entryPoint {uop.EntryPoint}, pool does not support the entryPoint"); } } } }