mirror of
https://github.com/status-im/status-go.git
synced 2025-02-19 18:28:18 +00:00
Default to sent if confirmations not enabled
This commit is contained in:
parent
272342fb6b
commit
1d752c087f
@ -189,6 +189,12 @@ func (m *EnvelopesMonitor) handleEventEnvelopeSent(event types.EnvelopeEvent) {
|
|||||||
}
|
}
|
||||||
m.batches[event.Batch][event.Hash] = struct{}{}
|
m.batches[event.Batch][event.Hash] = struct{}{}
|
||||||
m.logger.Debug("waiting for a confirmation", zap.String("batch", event.Batch.String()))
|
m.logger.Debug("waiting for a confirmation", zap.String("batch", event.Batch.String()))
|
||||||
|
} else {
|
||||||
|
m.logger.Debug("confirmation not expected, marking as sent")
|
||||||
|
m.envelopes[event.Hash] = EnvelopeSent
|
||||||
|
if m.handler != nil {
|
||||||
|
m.handler.EnvelopeSent(m.identifiers[event.Hash])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ func (s *EnvelopesMonitorSuite) TestEnvelopePosted() {
|
|||||||
Hash: testHash,
|
Hash: testHash,
|
||||||
})
|
})
|
||||||
s.Contains(s.monitor.envelopes, testHash)
|
s.Contains(s.monitor.envelopes, testHash)
|
||||||
s.Equal(EnvelopePosted, s.monitor.envelopes[testHash])
|
s.Equal(EnvelopeSent, s.monitor.envelopes[testHash])
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *EnvelopesMonitorSuite) TestConfirmedWithAcknowledge() {
|
func (s *EnvelopesMonitorSuite) TestConfirmedWithAcknowledge() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user