Skip to content

Commit

Permalink
fix: add missed test file update
Browse files Browse the repository at this point in the history
I had multiple changes in progress at once and missed committing this
file for the previous commit.
  • Loading branch information
mark-rushakoff committed Apr 24, 2024
1 parent 0ca5cdd commit 55c0cd5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tm/tmengine/internal/tmmirror/internal/tmi/fixture_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/rollchains/gordian/internal/gtest"
"github.com/rollchains/gordian/tm/tmconsensus"
"github.com/rollchains/gordian/tm/tmconsensus/tmconsensustest"
"github.com/rollchains/gordian/tm/tmengine/internal/tmeil"
"github.com/rollchains/gordian/tm/tmengine/internal/tmmirror/internal/tmi"
"github.com/rollchains/gordian/tm/tmstore/tmmemstore"
)
Expand All @@ -33,6 +34,9 @@ type KernelFixture struct {
AddPrevoteRequests chan tmi.AddPrevoteRequest
AddPrecommitRequests chan tmi.AddPrecommitRequest

StateMachineRoundActionsIn chan tmeil.StateMachineRoundActionSet
StateMachineViewOut chan tmconsensus.VersionedRoundView

Cfg tmi.KernelConfig
}

Expand All @@ -58,6 +62,12 @@ func NewKernelFixture(t *testing.T, nVals int) *KernelFixture {
addPrevoteRequests := make(chan tmi.AddPrevoteRequest)
addPrecommitRequests := make(chan tmi.AddPrecommitRequest)

// Okay to be unbuffered, this request would block reading from the response regardless.
smActionsIn := make(chan tmeil.StateMachineRoundActionSet)

// Must be unbuffered so kernel knows exactly what was sent to state machine.
smViewOut := make(chan tmconsensus.VersionedRoundView)

return &KernelFixture{
Log: gtest.NewLogger(t),

Expand All @@ -74,6 +84,9 @@ func NewKernelFixture(t *testing.T, nVals int) *KernelFixture {
AddPrevoteRequests: addPrevoteRequests,
AddPrecommitRequests: addPrecommitRequests,

StateMachineRoundActionsIn: smActionsIn,
StateMachineViewOut: smViewOut,

Cfg: tmi.KernelConfig{
Store: tmmemstore.NewMirrorStore(),
BlockStore: tmmemstore.NewBlockStore(),
Expand All @@ -90,6 +103,9 @@ func NewKernelFixture(t *testing.T, nVals int) *KernelFixture {
VotingViewOut: votingViewOutCh,
CommittingViewOut: committingViewOutCh,

StateMachineRoundActionsIn: smActionsIn,
StateMachineViewOut: smViewOut,

NHRRequests: nhrRequests,
SnapshotRequests: snapshotRequests,
ViewLookupRequests: viewLookupRequests,
Expand Down

0 comments on commit 55c0cd5

Please sign in to comment.