Skip to content

Commit b8104ac

Browse files
Fix incorrect naming of stateless block (#1652)
1 parent 725a589 commit b8104ac

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

chain/block.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ func NewGenesisBlock(root ids.ID) *StatelessBlock {
153153
}
154154
}
155155

156-
// Stateless is defined separately from "Block"
156+
// StatefulBlock is defined separately from "StatelessBlock"
157157
// in case external packages need to use the stateless block
158158
// without mocking VM or parent block
159159
type StatefulBlock struct {
@@ -200,7 +200,7 @@ func ParseBlock(
200200
return nil, err
201201
}
202202
// Not guaranteed that a parsed block is verified
203-
return ParseStatelessBlock(ctx, blk, source, accepted, vm)
203+
return ParseStatefulBlock(ctx, blk, source, accepted, vm)
204204
}
205205

206206
// populateTxs is only called on blocks we did not build
@@ -246,14 +246,14 @@ func (b *StatefulBlock) populateTxs(ctx context.Context) error {
246246
return nil
247247
}
248248

249-
func ParseStatelessBlock(
249+
func ParseStatefulBlock(
250250
ctx context.Context,
251251
blk *StatelessBlock,
252252
source []byte,
253253
accepted bool,
254254
vm VM,
255255
) (*StatefulBlock, error) {
256-
ctx, span := vm.Tracer().Start(ctx, "chain.ParseStatelessBlock")
256+
ctx, span := vm.Tracer().Start(ctx, "chain.ParseStatefulBlock")
257257
defer span.End()
258258

259259
// Perform basic correctness checks before doing any expensive work

vm/vm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ func (vm *VM) Initialize(
371371
snowCtx.Log.Info("genesis state created", zap.Stringer("root", root))
372372

373373
// Create genesis block
374-
genesisBlk, err := chain.ParseStatelessBlock(
374+
genesisBlk, err := chain.ParseStatefulBlock(
375375
ctx,
376376
chain.NewGenesisBlock(root),
377377
nil,

0 commit comments

Comments
 (0)