Skip to content

Commit 67e39d2

Browse files
committed
Remove bad test
This test does not actually test the computer. The account status was populate into the view during account creation, before the block is executed.
1 parent 6cb572d commit 67e39d2

File tree

1 file changed

+0
-70
lines changed

1 file changed

+0
-70
lines changed

engine/execution/computation/computer/computer_test.go

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ import (
3636
reusableRuntime "github.com/onflow/flow-go/fvm/runtime"
3737
"github.com/onflow/flow-go/fvm/state"
3838
"github.com/onflow/flow-go/fvm/storage"
39-
"github.com/onflow/flow-go/fvm/storage/testutils"
4039
"github.com/onflow/flow-go/fvm/systemcontracts"
4140
"github.com/onflow/flow-go/ledger"
4241
"github.com/onflow/flow-go/model/flow"
@@ -990,75 +989,6 @@ func (f *FixedAddressGenerator) AddressCount() uint64 {
990989
panic("not implemented")
991990
}
992991

993-
func Test_AccountStatusRegistersAreIncluded(t *testing.T) {
994-
995-
address := flow.HexToAddress("1234")
996-
fag := &FixedAddressGenerator{Address: address}
997-
998-
vm := fvm.NewVirtualMachine()
999-
execCtx := fvm.NewContext()
1000-
1001-
ledger := testutil.RootBootstrappedLedger(vm, execCtx)
1002-
1003-
key, err := unittest.AccountKeyDefaultFixture()
1004-
require.NoError(t, err)
1005-
1006-
view := delta.NewDeltaView(ledger)
1007-
accounts := environment.NewAccounts(testutils.NewSimpleTransaction(view))
1008-
1009-
err = accounts.Create([]flow.AccountPublicKey{key.PublicKey(1000)}, address)
1010-
require.NoError(t, err)
1011-
1012-
bservice := requesterunit.MockBlobService(blockstore.NewBlockstore(dssync.MutexWrap(datastore.NewMapDatastore())))
1013-
trackerStorage := mocktracker.NewMockStorage()
1014-
1015-
prov := provider.NewProvider(
1016-
zerolog.Nop(),
1017-
metrics.NewNoopCollector(),
1018-
execution_data.DefaultSerializer,
1019-
bservice,
1020-
trackerStorage,
1021-
)
1022-
1023-
me := new(modulemock.Local)
1024-
me.On("NodeID").Return(unittest.IdentifierFixture())
1025-
me.On("Sign", mock.Anything, mock.Anything).Return(nil, nil)
1026-
me.On("SignFunc", mock.Anything, mock.Anything, mock.Anything).
1027-
Return(nil, nil)
1028-
1029-
exe, err := computer.NewBlockComputer(
1030-
vm,
1031-
execCtx,
1032-
metrics.NewNoopCollector(),
1033-
trace.NewNoopTracer(),
1034-
zerolog.Nop(),
1035-
committer.NewNoopViewCommitter(),
1036-
me,
1037-
prov,
1038-
nil)
1039-
require.NoError(t, err)
1040-
1041-
block := generateBlockWithVisitor(1, 1, fag, func(txBody *flow.TransactionBody) {
1042-
err := testutil.SignTransaction(txBody, txBody.Payer, *key, 0)
1043-
require.NoError(t, err)
1044-
})
1045-
1046-
_, err = exe.ExecuteBlock(
1047-
context.Background(),
1048-
unittest.IdentifierFixture(),
1049-
block,
1050-
view,
1051-
derived.NewEmptyDerivedBlockData())
1052-
assert.NoError(t, err)
1053-
1054-
registerTouches := view.Interactions().RegisterTouches()
1055-
1056-
// make sure check for account status has been registered
1057-
id := flow.AccountStatusRegisterID(address)
1058-
1059-
require.Contains(t, registerTouches, id)
1060-
}
1061-
1062992
func Test_ExecutingSystemCollection(t *testing.T) {
1063993

1064994
execCtx := fvm.NewContext(

0 commit comments

Comments
 (0)