Skip to content

Commit

Permalink
better log
Browse files Browse the repository at this point in the history
  • Loading branch information
rauljordan committed Dec 12, 2023
1 parent 3886229 commit 90901af
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions assertions/scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (

protocol "github.com/OffchainLabs/bold/chain-abstraction"
"github.com/OffchainLabs/bold/challenge-manager/types"
"github.com/OffchainLabs/bold/containers"
"github.com/OffchainLabs/bold/containers/option"
"github.com/OffchainLabs/bold/containers/threadsafe"
l2stateprovider "github.com/OffchainLabs/bold/layer2-state-provider"
Expand Down Expand Up @@ -530,6 +531,13 @@ func (m *Manager) assertionConfirmed(ctx context.Context, assertionHash protocol
if currentBlock < creationBlock+confirmPeriodBlocks {
blocksLeftForConfirmation := (creationBlock + confirmPeriodBlocks) - currentBlock
timeToWait := m.averageTimeForBlockCreation * time.Duration(blocksLeftForConfirmation)
srvlog.Info(
fmt.Sprintf(
"Assertion with has %s needs at least %d blocks before being confirmable, waiting until then",
containers.Trunc(creationInfo.AssertionHash.Bytes()),
blocksLeftForConfirmation,
),
)
<-time.After(timeToWait)
}

Expand Down

0 comments on commit 90901af

Please sign in to comment.