Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
  • Loading branch information
joshua-kim committed May 6, 2024
1 parent d7d2ad3 commit 1a3ca3e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion vms/proposervm/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ func (vm *VM) SetPreference(ctx context.Context, preferred ids.ID) error {
return err
}

vm.ctx.Log.Debug("inserting processing block", zap.Stringer("blkID", postFork.getStatelessBlk().ID()))

Check failure on line 361 in vms/proposervm/vm.go

View workflow job for this annotation

GitHub Actions / Unit (self-hosted, linux, ARM64, focal)

undefined: postFork

Check failure on line 361 in vms/proposervm/vm.go

View workflow job for this annotation

GitHub Actions / Unit (self-hosted, linux, ARM64, focal)

undefined: postFork

Check failure on line 361 in vms/proposervm/vm.go

View workflow job for this annotation

GitHub Actions / Unit (self-hosted, linux, ARM64, jammy)

undefined: postFork

Check failure on line 361 in vms/proposervm/vm.go

View workflow job for this annotation

GitHub Actions / Unit (self-hosted, linux, ARM64, jammy)

undefined: postFork
if err := vm.State.PutProcessingBlock(optionBlk.ID()); err != nil {
return err
}
Expand Down Expand Up @@ -774,10 +775,11 @@ func (vm *VM) verifyAndRecordInnerBlk(ctx context.Context, blockCtx *block.Conte
return err
}

if err := vm.State.PutProcessingBlock(postFork.ID()); err != nil {
if err := vm.State.PutProcessingBlock(postFork.getStatelessBlk().ID()); err != nil {
return err
}

vm.ctx.Log.Debug("inserting processing block", zap.Stringer("blkID", postFork.getStatelessBlk().ID()))
if err := vm.State.PutBlock(postFork.getStatelessBlk(), choices.Processing); err != nil {
return err
}
Expand Down
6 changes: 3 additions & 3 deletions vms/proposervm/vm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2194,7 +2194,7 @@ func TestVM_VerifyBlockWithContext(t *testing.T) {
blk.EXPECT().getInnerBlk().Return(innerBlk).AnyTimes()
blkID := ids.GenerateTestID()
blk.EXPECT().ID().Return(blkID).AnyTimes()
blk.EXPECT().getStatelessBlk().Return(statelessBlk).Times(2)
blk.EXPECT().getStatelessBlk().Return(statelessBlk).AnyTimes()

require.NoError(vm.verifyAndRecordInnerBlk(
context.Background(),
Expand Down Expand Up @@ -2237,7 +2237,7 @@ func TestVM_VerifyBlockWithContext(t *testing.T) {
blk.EXPECT().getInnerBlk().Return(innerBlk).AnyTimes()
blkID := ids.GenerateTestID()
blk.EXPECT().ID().Return(blkID).AnyTimes()
blk.EXPECT().getStatelessBlk().Return(statelessBlk)
blk.EXPECT().getStatelessBlk().Return(statelessBlk).AnyTimes()
require.NoError(vm.verifyAndRecordInnerBlk(
context.Background(),
&block.Context{
Expand All @@ -2260,7 +2260,7 @@ func TestVM_VerifyBlockWithContext(t *testing.T) {
blk.EXPECT().getInnerBlk().Return(innerBlk).AnyTimes()
blkID := ids.GenerateTestID()
blk.EXPECT().ID().Return(blkID).AnyTimes()
blk.EXPECT().getStatelessBlk().Return(statelessBlk)
blk.EXPECT().getStatelessBlk().Return(statelessBlk).AnyTimes()
require.NoError(vm.verifyAndRecordInnerBlk(context.Background(), nil, blk))
}
}
Expand Down

0 comments on commit 1a3ca3e

Please sign in to comment.