Skip to content

Commit

Permalink
remove StatelessBlock.bctx
Browse files Browse the repository at this point in the history
  • Loading branch information
wlawt committed Apr 24, 2024
1 parent 32f4422 commit 8ead746
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions chain/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ type StatelessBlock struct {
bytes []byte
txsSet set.Set[ids.ID]

bctx *block.Context

results []*Result
feeManager *fees.Manager

Expand Down Expand Up @@ -260,7 +258,7 @@ func (*StatelessBlock) ShouldVerifyWithContext(context.Context) (bool, error) {
}

// implements "block.WithVerifyContext"
func (b *StatelessBlock) VerifyWithContext(ctx context.Context, bctx *block.Context) error {
func (b *StatelessBlock) VerifyWithContext(ctx context.Context, _ *block.Context) error {
start := time.Now()
defer func() {
b.vm.RecordBlockVerify(time.Since(start))
Expand All @@ -273,15 +271,11 @@ func (b *StatelessBlock) VerifyWithContext(ctx context.Context, bctx *block.Cont
attribute.Int("txs", len(b.Txs)),
attribute.Int64("height", int64(b.Hght)),
attribute.Bool("stateReady", stateReady),
attribute.Int64("pchainHeight", int64(bctx.PChainHeight)),
attribute.Bool("built", b.Processed()),
),
)
defer span.End()

// Persist the context in case we need it during Accept
b.bctx = bctx

// Proceed with normal verification
return b.verify(ctx, stateReady)
}
Expand Down

0 comments on commit 8ead746

Please sign in to comment.