Updated log levels for bootstrapping

This commit is contained in:
StephenButtolph 2020-05-26 16:02:41 -04:00
parent 6d82e63ad8
commit 855d15ec09
2 changed files with 6 additions and 2 deletions

View File

@ -65,12 +65,14 @@ func (t *txJob) Execute() error {
return fmt.Errorf("attempting to execute transaction with status %s", status)
case choices.Processing:
if err := t.tx.Verify(); err != nil {
t.log.Warn("transaction %s failed verification during bootstrapping due to %s",
t.log.Debug("transaction %s failed verification during bootstrapping due to %s",
t.tx.ID(), err)
}
t.numAccepted.Inc()
if err := t.tx.Accept(); err != nil {
t.log.Error("transaction %s failed to accept during bootstrapping due to %s",
t.tx.ID(), err)
return fmt.Errorf("failed to accept transaction in bootstrapping: %w", err)
}
}

View File

@ -61,12 +61,14 @@ func (b *blockJob) Execute() error {
return fmt.Errorf("attempting to execute block with status %s", status)
case choices.Processing:
if err := b.blk.Verify(); err != nil {
b.log.Warn("block %s failed verification during bootstrapping due to %s",
b.log.Debug("block %s failed verification during bootstrapping due to %s",
b.blk.ID(), err)
}
b.numAccepted.Inc()
if err := b.blk.Accept(); err != nil {
b.log.Debug("block %s failed to accept during bootstrapping due to %s",
b.blk.ID(), err)
return fmt.Errorf("failed to accept block in bootstrapping: %w", err)
}
}