Skip to content

Commit

Permalink
wip: updating avm UTs to E upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
abi87 committed Feb 11, 2024
1 parent 72fb443 commit 8211da8
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 37 deletions.
14 changes: 7 additions & 7 deletions vms/avm/block/builder/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func TestBuilderBuildBlock(t *testing.T) {
return New(
&txexecutor.Backend{
Config: &config.Config{
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
Ctx: &snow.Context{
Log: logging.NoLog{},
Expand Down Expand Up @@ -193,7 +193,7 @@ func TestBuilderBuildBlock(t *testing.T) {
return New(
&txexecutor.Backend{
Config: &config.Config{
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
Ctx: &snow.Context{
Log: logging.NoLog{},
Expand Down Expand Up @@ -242,7 +242,7 @@ func TestBuilderBuildBlock(t *testing.T) {
return New(
&txexecutor.Backend{
Config: &config.Config{
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
Ctx: &snow.Context{
Log: logging.NoLog{},
Expand Down Expand Up @@ -338,7 +338,7 @@ func TestBuilderBuildBlock(t *testing.T) {
&txexecutor.Backend{
Codec: codec,
Config: &config.Config{
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
Ctx: &snow.Context{
Log: logging.NoLog{},
Expand Down Expand Up @@ -413,7 +413,7 @@ func TestBuilderBuildBlock(t *testing.T) {
&txexecutor.Backend{
Codec: codec,
Config: &config.Config{
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
Ctx: &snow.Context{
Log: logging.NoLog{},
Expand Down Expand Up @@ -490,7 +490,7 @@ func TestBuilderBuildBlock(t *testing.T) {
&txexecutor.Backend{
Codec: codec,
Config: &config.Config{
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
Ctx: &snow.Context{
Log: logging.NoLog{},
Expand Down Expand Up @@ -546,7 +546,7 @@ func TestBlockBuilderAddLocalTx(t *testing.T) {
Log: logging.NoLog{},
},
Config: &config.Config{
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
Codec: parser.Codec(),
}
Expand Down
48 changes: 24 additions & 24 deletions vms/avm/block/executor/block_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func TestBlockVerify(t *testing.T) {
backend: &executor.Backend{
Config: &config.Config{
DurangoTime: time.Time{},
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
},
blkIDToState: map[ids.ID]*blockState{},
Expand All @@ -75,7 +75,7 @@ func TestBlockVerify(t *testing.T) {
backend: &executor.Backend{
Config: &config.Config{
DurangoTime: time.Time{},
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
},
},
Expand All @@ -100,7 +100,7 @@ func TestBlockVerify(t *testing.T) {
backend: &executor.Backend{
Config: &config.Config{
DurangoTime: time.Time{},
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
},
clk: clk,
Expand All @@ -123,7 +123,7 @@ func TestBlockVerify(t *testing.T) {
backend: &executor.Backend{
Config: &config.Config{
DurangoTime: time.Time{},
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
},
blkIDToState: map[ids.ID]*blockState{},
Expand Down Expand Up @@ -155,7 +155,7 @@ func TestBlockVerify(t *testing.T) {
backend: &executor.Backend{
Config: &config.Config{
DurangoTime: time.Time{},
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
},
mempool: mempool,
Expand Down Expand Up @@ -193,7 +193,7 @@ func TestBlockVerify(t *testing.T) {
backend: &executor.Backend{
Config: &config.Config{
DurangoTime: time.Time{},
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
},
state: mockState,
Expand Down Expand Up @@ -235,7 +235,7 @@ func TestBlockVerify(t *testing.T) {
backend: &executor.Backend{
Config: &config.Config{
DurangoTime: time.Time{},
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
},
state: mockState,
Expand Down Expand Up @@ -280,7 +280,7 @@ func TestBlockVerify(t *testing.T) {
backend: &executor.Backend{
Config: &config.Config{
DurangoTime: time.Time{},
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
},
blkIDToState: map[ids.ID]*blockState{
Expand Down Expand Up @@ -333,7 +333,7 @@ func TestBlockVerify(t *testing.T) {
backend: &executor.Backend{
Config: &config.Config{
DurangoTime: time.Time{},
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
},
mempool: mempool,
Expand Down Expand Up @@ -391,7 +391,7 @@ func TestBlockVerify(t *testing.T) {
backend: &executor.Backend{
Config: &config.Config{
DurangoTime: time.Time{},
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
},
blkIDToState: map[ids.ID]*blockState{
Expand Down Expand Up @@ -474,7 +474,7 @@ func TestBlockVerify(t *testing.T) {
backend: &executor.Backend{
Config: &config.Config{
DurangoTime: time.Time{},
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
},
blkIDToState: map[ids.ID]*blockState{
Expand Down Expand Up @@ -537,7 +537,7 @@ func TestBlockVerify(t *testing.T) {
backend: &executor.Backend{
Config: &config.Config{
DurangoTime: time.Time{},
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
},
blkIDToState: map[ids.ID]*blockState{
Expand Down Expand Up @@ -594,7 +594,7 @@ func TestBlockVerify(t *testing.T) {
backend: &executor.Backend{
Config: &config.Config{
DurangoTime: time.Time{},
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
},
blkIDToState: map[ids.ID]*blockState{
Expand Down Expand Up @@ -676,7 +676,7 @@ func TestBlockAccept(t *testing.T) {
},
Config: &config.Config{
DurangoTime: time.Time{},
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
},
blkIDToState: map[ids.ID]*blockState{},
Expand Down Expand Up @@ -714,7 +714,7 @@ func TestBlockAccept(t *testing.T) {
},
Config: &config.Config{
DurangoTime: time.Time{},
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
},
blkIDToState: map[ids.ID]*blockState{
Expand Down Expand Up @@ -762,7 +762,7 @@ func TestBlockAccept(t *testing.T) {
},
Config: &config.Config{
DurangoTime: time.Time{},
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
},
blkIDToState: map[ids.ID]*blockState{
Expand Down Expand Up @@ -814,7 +814,7 @@ func TestBlockAccept(t *testing.T) {
},
Config: &config.Config{
DurangoTime: time.Time{},
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
},
blkIDToState: map[ids.ID]*blockState{
Expand Down Expand Up @@ -869,7 +869,7 @@ func TestBlockAccept(t *testing.T) {
},
Config: &config.Config{
DurangoTime: time.Time{},
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
},
blkIDToState: map[ids.ID]*blockState{
Expand Down Expand Up @@ -970,7 +970,7 @@ func TestBlockReject(t *testing.T) {
Bootstrapped: true,
Config: &config.Config{
DurangoTime: time.Time{},
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
Ctx: &snow.Context{
Log: logging.NoLog{},
Expand Down Expand Up @@ -1035,7 +1035,7 @@ func TestBlockReject(t *testing.T) {
},
Config: &config.Config{
DurangoTime: time.Time{},
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
},
state: mockState,
Expand Down Expand Up @@ -1089,7 +1089,7 @@ func TestBlockStatus(t *testing.T) {
backend: &executor.Backend{
Config: &config.Config{
DurangoTime: time.Time{},
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
},
lastAccepted: blockID,
Expand All @@ -1110,7 +1110,7 @@ func TestBlockStatus(t *testing.T) {
backend: &executor.Backend{
Config: &config.Config{
DurangoTime: time.Time{},
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
},
blkIDToState: map[ids.ID]*blockState{
Expand All @@ -1137,7 +1137,7 @@ func TestBlockStatus(t *testing.T) {
backend: &executor.Backend{
Config: &config.Config{
DurangoTime: time.Time{},
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
},
blkIDToState: map[ids.ID]*blockState{},
Expand All @@ -1163,7 +1163,7 @@ func TestBlockStatus(t *testing.T) {
backend: &executor.Backend{
Config: &config.Config{
DurangoTime: time.Time{},
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
},
blkIDToState: map[ids.ID]*blockState{},
Expand Down
11 changes: 5 additions & 6 deletions vms/avm/block/executor/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (

"github.com/ava-labs/avalanchego/ids"
"github.com/ava-labs/avalanchego/utils/set"
"github.com/ava-labs/avalanchego/utils/timer/mockable"
"github.com/ava-labs/avalanchego/vms/avm/block"
"github.com/ava-labs/avalanchego/vms/avm/config"
"github.com/ava-labs/avalanchego/vms/avm/state"
Expand Down Expand Up @@ -129,7 +128,7 @@ func TestManagerVerifyTx(t *testing.T) {
backend: &executor.Backend{
Config: &config.Config{
DurangoTime: time.Time{},
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
},
}
Expand All @@ -151,7 +150,7 @@ func TestManagerVerifyTx(t *testing.T) {
Bootstrapped: true,
Config: &config.Config{
DurangoTime: time.Time{},
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
},
}
Expand Down Expand Up @@ -183,7 +182,7 @@ func TestManagerVerifyTx(t *testing.T) {
Bootstrapped: true,
Config: &config.Config{
DurangoTime: time.Time{},
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
},
state: state,
Expand Down Expand Up @@ -219,7 +218,7 @@ func TestManagerVerifyTx(t *testing.T) {
Bootstrapped: true,
Config: &config.Config{
DurangoTime: time.Time{},
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
},
state: state,
Expand Down Expand Up @@ -255,7 +254,7 @@ func TestManagerVerifyTx(t *testing.T) {
Bootstrapped: true,
Config: &config.Config{
DurangoTime: time.Time{},
EUpgradeTime: mockable.MaxTime,
EUpgradeTime: time.Time{},
},
},
state: state,
Expand Down

0 comments on commit 8211da8

Please sign in to comment.