Node: Just delete the PYTHNET messages

This commit is contained in:
Bruce Riley 2022-10-28 17:24:27 +00:00 committed by Evan Gray
parent 391781d7f7
commit 346b68582a
2 changed files with 0 additions and 4 deletions

View File

@ -230,7 +230,6 @@ func (p *Processor) handleCleanup(ctx context.Context) {
oldestTime := time.Now().Add(-time.Hour)
for key, pe := range p.pythnetVaas {
if pe.updateTime.Before(oldestTime) {
p.logger.Debug("PYTHNET: dropping old pythnet vaa", zap.String("message_id", key), zap.Stringer("updateTime", pe.updateTime))
delete(p.pythnetVaas, key)
}
}

View File

@ -235,7 +235,6 @@ func (p *Processor) Run(ctx context.Context) error {
func (p *Processor) storeSignedVAA(v *vaa.VAA) error {
if v.EmitterChain == vaa.ChainIDPythNet {
key := fmt.Sprintf("%v/%v", v.EmitterAddress, v.Sequence)
p.logger.Debug("PYTHNET: storing pythnet vaa", zap.String("message_id", key))
p.pythnetVaas[key] = PythNetVaaEntry{v: v, updateTime: time.Now()}
return nil
}
@ -247,11 +246,9 @@ func (p *Processor) getSignedVAA(id db.VAAID) (*vaa.VAA, error) {
key := fmt.Sprintf("%v/%v", id.EmitterAddress, id.Sequence)
ret, exists := p.pythnetVaas[key]
if exists {
p.logger.Debug("PYTHNET: found pythnet vaa", zap.String("message_id", key))
return ret.v, nil
}
p.logger.Debug("PYTHNET: did not find pythnet vaa", zap.String("message_id", key))
return nil, db.ErrVAANotFound
}