Skip to content

Commit

Permalink
Merge pull request #607 from iotaledger/feat/sanity-checks
Browse files Browse the repository at this point in the history
incorporate protocol params with sanity checks
  • Loading branch information
muXxer authored Dec 6, 2023
2 parents b13c7de + b3974dc commit 287177b
Show file tree
Hide file tree
Showing 33 changed files with 146 additions and 260 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ require (
github.com/iotaledger/hive.go/stringify v0.0.0-20231205131244-472357435a39
github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231201123347-1c44b3f24221
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231201114846-3bb5c3fd5665
github.com/iotaledger/iota.go/v4 v4.0.0-20231204142547-416c9a87403d
github.com/iotaledger/iota.go/v4 v4.0.0-20231206094936-1d3d3ed96559
github.com/labstack/echo/v4 v4.11.3
github.com/labstack/gommon v0.4.1
github.com/libp2p/go-libp2p v0.32.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,8 @@ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231201123347-1c44b3f24221 h1:+ozra
github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231201123347-1c44b3f24221/go.mod h1:6cLX3gnhP0WL+Q+mf3/rIqfACe5fWKVR8luPXWh2xiY=
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231201114846-3bb5c3fd5665 h1:XdhojOpZ0t0pJFyNO0zlBogSAUrhEI67eCpTC9H6sGM=
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231201114846-3bb5c3fd5665/go.mod h1:obK1N42oafGA7EH6zC4VX2fKh7jTa3WnIa9h1azfxq0=
github.com/iotaledger/iota.go/v4 v4.0.0-20231204142547-416c9a87403d h1:MPklxa8jW4/EgDm/LEzf6orxjik7U+vMUW/ToGT1Zqg=
github.com/iotaledger/iota.go/v4 v4.0.0-20231204142547-416c9a87403d/go.mod h1:lCk9rhP3B5pX9BKhzR+Jobq4xPd+GHlqgF4Ga+eQfWA=
github.com/iotaledger/iota.go/v4 v4.0.0-20231206094936-1d3d3ed96559 h1:qCXtPHNkshYFS9DJZEV0WeJEkN50syEuhFZobJjAIbw=
github.com/iotaledger/iota.go/v4 v4.0.0-20231206094936-1d3d3ed96559/go.mod h1:lCk9rhP3B5pX9BKhzR+Jobq4xPd+GHlqgF4Ga+eQfWA=
github.com/ipfs/boxo v0.13.1 h1:nQ5oQzcMZR3oL41REJDcTbrvDvuZh3J9ckc9+ILeRQI=
github.com/ipfs/boxo v0.13.1/go.mod h1:btrtHy0lmO1ODMECbbEY1pxNtrLilvKSYLoGQt1yYCk=
github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s=
Expand Down
8 changes: 4 additions & 4 deletions pkg/protocol/engine/accounts/accountsledger/testsuite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type TestSuite struct {
}

func NewTestSuite(test *testing.T) *TestSuite {
testAPI := tpkg.TestAPI
testAPI := tpkg.ZeroCostTestAPI

t := &TestSuite{
T: test,
Expand All @@ -65,7 +65,7 @@ func (t *TestSuite) initAccountLedger() *accountsledger.Manager {
prunableStores[slot] = mapdb.NewMapDB()
}

p := slotstore.NewAccountDiffs(slot, prunableStores[slot], tpkg.TestAPI)
p := slotstore.NewAccountDiffs(slot, prunableStores[slot], tpkg.ZeroCostTestAPI)

return p, nil
}
Expand Down Expand Up @@ -187,8 +187,8 @@ func (t *TestSuite) ApplySlotActions(slot iotago.SlotIndex, rmc iotago.Mana, act
}

func (t *TestSuite) createBlockWithRMC(accountID iotago.AccountID, slot iotago.SlotIndex, rmc iotago.Mana) *blocks.Block {
innerBlock := tpkg.RandBasicBlockWithIssuerAndRMC(tpkg.TestAPI, accountID, rmc)
innerBlock.Header.IssuingTime = tpkg.TestAPI.TimeProvider().SlotStartTime(slot)
innerBlock := tpkg.RandBasicBlockWithIssuerAndRMC(tpkg.ZeroCostTestAPI, accountID, rmc)
innerBlock.Header.IssuingTime = tpkg.ZeroCostTestAPI.TimeProvider().SlotStartTime(slot)
modelBlock, err := model.BlockFromBlock(innerBlock)

require.NoError(t.T, err)
Expand Down
14 changes: 7 additions & 7 deletions pkg/protocol/engine/accounts/mana/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func TestManager_GetManaOnAccountOverflow(t *testing.T) {
switch id {
case accountIDOverflow:
return utxoledger.CreateOutput(
iotago.SingleVersionProvider(tpkg.TestAPI),
iotago.SingleVersionProvider(tpkg.ZeroCostTestAPI),
iotago.OutputIDFromTransactionIDAndIndex(iotago.NewTransactionID(0, tpkg.Rand32ByteArray()), 0),
tpkg.RandBlockID(),
tpkg.RandSlot(),
Expand All @@ -33,11 +33,11 @@ func TestManager_GetManaOnAccountOverflow(t *testing.T) {
Mana: iotago.MaxMana/2 + iotago.MaxMana/4,
AccountID: accountIDOverflow,
},
lo.PanicOnErr(iotago.NewOutputIDProof(tpkg.TestAPI, tpkg.Rand32ByteArray(), tpkg.RandSlot(), iotago.TxEssenceOutputs{tpkg.RandBasicOutput(iotago.AddressEd25519)}, 0)),
lo.PanicOnErr(iotago.NewOutputIDProof(tpkg.ZeroCostTestAPI, tpkg.Rand32ByteArray(), tpkg.RandSlot(), iotago.TxEssenceOutputs{tpkg.RandBasicOutput(iotago.AddressEd25519)}, 0)),
), nil
case accountIDRecentOutput:
return utxoledger.CreateOutput(
iotago.SingleVersionProvider(tpkg.TestAPI),
iotago.SingleVersionProvider(tpkg.ZeroCostTestAPI),
iotago.OutputIDFromTransactionIDAndIndex(iotago.NewTransactionID(1, tpkg.Rand32ByteArray()), 0),
tpkg.RandBlockID(),
tpkg.RandSlot(),
Expand All @@ -46,11 +46,11 @@ func TestManager_GetManaOnAccountOverflow(t *testing.T) {
Mana: iotago.MaxMana / 2,
AccountID: id,
},
lo.PanicOnErr(iotago.NewOutputIDProof(tpkg.TestAPI, tpkg.Rand32ByteArray(), tpkg.RandSlot(), iotago.TxEssenceOutputs{tpkg.RandBasicOutput(iotago.AddressEd25519)}, 0)),
lo.PanicOnErr(iotago.NewOutputIDProof(tpkg.ZeroCostTestAPI, tpkg.Rand32ByteArray(), tpkg.RandSlot(), iotago.TxEssenceOutputs{tpkg.RandBasicOutput(iotago.AddressEd25519)}, 0)),
), nil
default:
return utxoledger.CreateOutput(
iotago.SingleVersionProvider(tpkg.TestAPI),
iotago.SingleVersionProvider(tpkg.ZeroCostTestAPI),
iotago.OutputIDFromTransactionIDAndIndex(iotago.NewTransactionID(0, tpkg.Rand32ByteArray()), 0),
tpkg.RandBlockID(),
tpkg.RandSlot(),
Expand All @@ -59,7 +59,7 @@ func TestManager_GetManaOnAccountOverflow(t *testing.T) {
Mana: iotago.MaxMana / 2,
AccountID: id,
},
lo.PanicOnErr(iotago.NewOutputIDProof(tpkg.TestAPI, tpkg.Rand32ByteArray(), tpkg.RandSlot(), iotago.TxEssenceOutputs{tpkg.RandBasicOutput(iotago.AddressEd25519)}, 0)),
lo.PanicOnErr(iotago.NewOutputIDProof(tpkg.ZeroCostTestAPI, tpkg.Rand32ByteArray(), tpkg.RandSlot(), iotago.TxEssenceOutputs{tpkg.RandBasicOutput(iotago.AddressEd25519)}, 0)),
), nil
}
}
Expand Down Expand Up @@ -100,7 +100,7 @@ func TestManager_GetManaOnAccountOverflow(t *testing.T) {
}
}

manager := NewManager(iotago.SingleVersionProvider(tpkg.TestAPI), outputRetriever, accountRetriever)
manager := NewManager(iotago.SingleVersionProvider(tpkg.ZeroCostTestAPI), outputRetriever, accountRetriever)
manaDecayProvider := manager.apiProvider.LatestAPI().ManaDecayProvider()

// The value for this account will overflow because component values are too big.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,8 @@ func NewTestFramework(test *testing.T) *TestFramework {
}

t.testAPI = iotago.V3API(
iotago.NewV3ProtocolParameters(
iotago.WithNetworkOptions("TestJungle", "tgl"),
iotago.WithSupplyOptions(10000, 0, 0, 0, 0, 0, 0),
iotago.WithLivenessOptions(10, 10, 1, 2, 8),
iotago.NewV3TestProtocolParameters(
iotago.WithLivenessOptions(5, 5, 1, 2, 8),
),
)

Expand Down
10 changes: 5 additions & 5 deletions pkg/protocol/engine/consensus/blockgadget/testframework_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func NewTestFramework(test *testing.T) *TestFramework {
T: test,
blocks: shrinkingmap.New[string, *blocks.Block](),

SeatManager: mock.NewManualPOA(iotago.SingleVersionProvider(tpkg.TestAPI), epochstore.NewStore(kvstore.Realm{}, mapdb.NewMapDB(), 0, (*account.Accounts).Bytes, account.AccountsFromBytes)),
SeatManager: mock.NewManualPOA(iotago.SingleVersionProvider(tpkg.ZeroCostTestAPI), epochstore.NewStore(kvstore.Realm{}, mapdb.NewMapDB(), 0, (*account.Accounts).Bytes, account.AccountsFromBytes)),
}

evictionState := eviction.NewState(mapdb.NewMapDB(), func(slot iotago.SlotIndex) (*slotstore.Store[iotago.BlockID, iotago.CommitmentID], error) {
Expand All @@ -53,18 +53,18 @@ func NewTestFramework(test *testing.T) *TestFramework {
iotago.CommitmentIDFromBytes,
), nil
}, func() iotago.BlockID {
return tpkg.TestAPI.ProtocolParameters().GenesisBlockID()
return tpkg.ZeroCostTestAPI.ProtocolParameters().GenesisBlockID()
})

t.blockCache = blocks.New(evictionState, iotago.SingleVersionProvider(tpkg.TestAPI))
t.blockCache = blocks.New(evictionState, iotago.SingleVersionProvider(tpkg.ZeroCostTestAPI))
instance := thresholdblockgadget.New(t.blockCache, t.SeatManager, func(err error) {
fmt.Printf(">> Gadget.Error: %s\n", err)
})

t.Events = instance.Events()
t.Instance = instance

genesisBlock := blocks.NewRootBlock(tpkg.TestAPI.ProtocolParameters().GenesisBlockID(), iotago.NewEmptyCommitment(tpkg.TestAPI).MustID(), time.Unix(tpkg.TestAPI.TimeProvider().GenesisUnixTime(), 0))
genesisBlock := blocks.NewRootBlock(tpkg.ZeroCostTestAPI.ProtocolParameters().GenesisBlockID(), iotago.NewEmptyCommitment(tpkg.ZeroCostTestAPI).MustID(), time.Unix(tpkg.ZeroCostTestAPI.TimeProvider().GenesisUnixTime(), 0))
t.blocks.Set("Genesis", genesisBlock)
genesisBlock.ID().RegisterAlias("Genesis")
evictionState.AddRootBlock(genesisBlock.ID(), genesisBlock.SlotCommitmentID())
Expand Down Expand Up @@ -106,7 +106,7 @@ func (t *TestFramework) CreateBlock(alias string, issuerAlias string, parents ..
_, priv, err := ed25519.GenerateKey(nil)
require.NoError(t, err)

block, err := builder.NewValidationBlockBuilder(tpkg.TestAPI).
block, err := builder.NewValidationBlockBuilder(tpkg.ZeroCostTestAPI).
StrongParents(t.BlockIDs(parents...)).
Sign(t.SeatManager.AccountID(issuerAlias), priv).
IssuingTime(time.Now()).
Expand Down
20 changes: 10 additions & 10 deletions pkg/protocol/engine/eviction/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,24 @@ func TestState_RootBlocks(t *testing.T) {
prunableStorage := prunable.New(database.Config{
Engine: hivedb.EngineMapDB,
Directory: t.TempDir(),
}, iotago.SingleVersionProvider(tpkg.TestAPI), errorHandler)
}, iotago.SingleVersionProvider(tpkg.ZeroCostTestAPI), errorHandler)

ts := NewTestFramework(t, prunableStorage, eviction.NewState(mapdb.NewMapDB(), prunableStorage.RootBlocks, func() iotago.BlockID {
return tpkg.TestAPI.ProtocolParameters().GenesisBlockID()
return tpkg.ZeroCostTestAPI.ProtocolParameters().GenesisBlockID()
}, eviction.WithRootBlocksEvictionDelay(3)))
ts.CreateAndAddRootBlock("Genesis", 0, iotago.NewEmptyCommitment(tpkg.TestAPI).MustID())
ts.CreateAndAddRootBlock("Genesis", 0, iotago.NewEmptyCommitment(tpkg.ZeroCostTestAPI).MustID())
ts.RequireActiveRootBlocks("Genesis")
ts.RequireLastEvictedSlot(0)

ts.Instance.Initialize(0)

ts.CreateAndAddRootBlock("Root1.0", 1, iotago.NewEmptyCommitment(tpkg.TestAPI).MustID())
ts.CreateAndAddRootBlock("Root1.1", 1, iotago.NewEmptyCommitment(tpkg.TestAPI).MustID())
ts.CreateAndAddRootBlock("Root2.0", 2, iotago.NewEmptyCommitment(tpkg.TestAPI).MustID())
ts.CreateAndAddRootBlock("Root3.0", 3, iotago.NewEmptyCommitment(tpkg.TestAPI).MustID())
ts.CreateAndAddRootBlock("Root4.0", 4, iotago.NewEmptyCommitment(tpkg.TestAPI).MustID())
ts.CreateAndAddRootBlock("Root4.1", 4, iotago.NewEmptyCommitment(tpkg.TestAPI).MustID())
ts.CreateAndAddRootBlock("Root5.0", 5, iotago.NewEmptyCommitment(tpkg.TestAPI).MustID())
ts.CreateAndAddRootBlock("Root1.0", 1, iotago.NewEmptyCommitment(tpkg.ZeroCostTestAPI).MustID())
ts.CreateAndAddRootBlock("Root1.1", 1, iotago.NewEmptyCommitment(tpkg.ZeroCostTestAPI).MustID())
ts.CreateAndAddRootBlock("Root2.0", 2, iotago.NewEmptyCommitment(tpkg.ZeroCostTestAPI).MustID())
ts.CreateAndAddRootBlock("Root3.0", 3, iotago.NewEmptyCommitment(tpkg.ZeroCostTestAPI).MustID())
ts.CreateAndAddRootBlock("Root4.0", 4, iotago.NewEmptyCommitment(tpkg.ZeroCostTestAPI).MustID())
ts.CreateAndAddRootBlock("Root4.1", 4, iotago.NewEmptyCommitment(tpkg.ZeroCostTestAPI).MustID())
ts.CreateAndAddRootBlock("Root5.0", 5, iotago.NewEmptyCommitment(tpkg.ZeroCostTestAPI).MustID())

ts.RequireActiveRootBlocks("Genesis")
ts.RequireLastEvictedSlot(0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func (t *TestFramework) IssueSignedBlockAtSlotWithBurnedMana(alias string, slot
}

func TestPostSolidFilter_NoAccount(t *testing.T) {
testAPI := tpkg.TestAPI
testAPI := tpkg.ZeroCostTestAPI

tf := NewTestFramework(t,
iotago.SingleVersionProvider(testAPI),
Expand Down Expand Up @@ -179,7 +179,7 @@ func TestPostSolidFilter_NoAccount(t *testing.T) {
}

func TestPostSolidFilter_BurnedMana(t *testing.T) {
testAPI := tpkg.TestAPI
testAPI := tpkg.ZeroCostTestAPI

tf := NewTestFramework(t,
iotago.SingleVersionProvider(testAPI),
Expand Down Expand Up @@ -227,7 +227,7 @@ func TestPostSolidFilter_BurnedMana(t *testing.T) {
}

func TestPostSolidFilter_Expiry(t *testing.T) {
testAPI := tpkg.TestAPI
testAPI := tpkg.ZeroCostTestAPI

tf := NewTestFramework(t,
iotago.SingleVersionProvider(testAPI),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func mockedCommitteeFunc(validatorAccountID iotago.AccountID) func(iotago.SlotIn
func TestFilter_WithMaxAllowedWallClockDrift(t *testing.T) {
allowedDrift := 3 * time.Second

testAPI := tpkg.TestAPI
testAPI := tpkg.ZeroCostTestAPI

tf := NewTestFramework(t,
iotago.SingleVersionProvider(testAPI),
Expand All @@ -137,12 +137,12 @@ func TestFilter_ProtocolVersion(t *testing.T) {
apiProvider := iotago.NewEpochBasedProvider(
iotago.WithAPIForMissingVersionCallback(
func(params iotago.ProtocolParameters) (iotago.API, error) {
return iotago.V3API(iotago.NewV3ProtocolParameters(iotago.WithVersion(params.Version()))), nil
return iotago.V3API(iotago.NewV3TestProtocolParameters(iotago.WithVersion(params.Version()))), nil
},
),
)
apiProvider.AddProtocolParametersAtEpoch(iotago.NewV3ProtocolParameters(iotago.WithVersion(3)), 0)
apiProvider.AddProtocolParametersAtEpoch(iotago.NewV3ProtocolParameters(iotago.WithVersion(4)), 3)
apiProvider.AddProtocolParametersAtEpoch(iotago.NewV3TestProtocolParameters(iotago.WithVersion(3)), 0)
apiProvider.AddProtocolParametersAtEpoch(iotago.NewV3TestProtocolParameters(iotago.WithVersion(4)), 3)

timeProvider := apiProvider.CommittedAPI().TimeProvider()

Expand Down Expand Up @@ -187,7 +187,7 @@ func TestFilter_ProtocolVersion(t *testing.T) {
valid.Add("G")
require.NoError(t, tf.IssueBlockAtSlotWithVersion("G", timeProvider.EpochStart(5)+5, 4, apiProvider))

apiProvider.AddProtocolParametersAtEpoch(iotago.NewV3ProtocolParameters(iotago.WithVersion(5)), 10)
apiProvider.AddProtocolParametersAtEpoch(iotago.NewV3TestProtocolParameters(iotago.WithVersion(5)), 10)

valid.Add("H")
require.NoError(t, tf.IssueBlockAtSlotWithVersion("H", timeProvider.EpochEnd(9), 4, apiProvider))
Expand All @@ -200,7 +200,7 @@ func TestFilter_ProtocolVersion(t *testing.T) {
}

func TestFilter_ValidationBlocks(t *testing.T) {
testAPI := tpkg.TestAPI
testAPI := tpkg.ZeroCostTestAPI

tf := NewTestFramework(t,
iotago.SingleVersionProvider(testAPI),
Expand Down
4 changes: 2 additions & 2 deletions pkg/protocol/engine/mempool/v1/mempool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func TestMempoolV1_ResourceCleanup(t *testing.T) {
spendDAG := spenddagv1.New[iotago.TransactionID, mempool.StateID, vote.MockedRank](func() int { return 0 })
memPoolInstance := New[vote.MockedRank](new(mempooltests.VM), func(reference mempool.StateReference) *promise.Promise[mempool.State] {
return ledgerState.ResolveOutputState(reference)
}, mutationsFunc, workers, spendDAG, iotago.SingleVersionProvider(tpkg.TestAPI), func(error) {})
}, mutationsFunc, workers, spendDAG, iotago.SingleVersionProvider(tpkg.ZeroCostTestAPI), func(error) {})

tf := mempooltests.NewTestFramework(t, memPoolInstance, spendDAG, ledgerState, workers)

Expand Down Expand Up @@ -149,5 +149,5 @@ func newTestFramework(t *testing.T) *mempooltests.TestFramework {

return mempooltests.NewTestFramework(t, New[vote.MockedRank](new(mempooltests.VM), func(reference mempool.StateReference) *promise.Promise[mempool.State] {
return ledgerState.ResolveOutputState(reference)
}, mutationsFunc, workers, spendDAG, iotago.SingleVersionProvider(tpkg.TestAPI), func(error) {}), spendDAG, ledgerState, workers)
}, mutationsFunc, workers, spendDAG, iotago.SingleVersionProvider(tpkg.ZeroCostTestAPI), func(error) {}), spendDAG, ledgerState, workers)
}
2 changes: 1 addition & 1 deletion pkg/protocol/engine/tipmanager/tests/testframework.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func NewTestFramework(test *testing.T) *TestFramework {
tipMetadataByAlias: make(map[string]tipmanager.TipMetadata),
blocksByID: make(map[iotago.BlockID]*blocks.Block),
test: test,
API: tpkg.TestAPI,
API: tpkg.ZeroCostTestAPI,
}

t.blockIDsByAlias["Genesis"] = iotago.EmptyBlockID
Expand Down
4 changes: 2 additions & 2 deletions pkg/protocol/engine/utxoledger/iteration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

func TestUTXOComputeBalance(t *testing.T) {
manager := utxoledger.New(mapdb.NewMapDB(), iotago.SingleVersionProvider(iotago_tpkg.TestAPI))
manager := utxoledger.New(mapdb.NewMapDB(), iotago.SingleVersionProvider(iotago_tpkg.ZeroCostTestAPI))

initialOutput := tpkg.RandLedgerStateOutputOnAddressWithAmount(iotago.OutputBasic, iotago_tpkg.RandAddress(iotago.AddressEd25519), 2_134_656_365)
require.NoError(t, manager.AddGenesisUnspentOutput(initialOutput))
Expand Down Expand Up @@ -51,7 +51,7 @@ func TestUTXOComputeBalance(t *testing.T) {
}

func TestUTXOIteration(t *testing.T) {
manager := utxoledger.New(mapdb.NewMapDB(), iotago.SingleVersionProvider(iotago_tpkg.TestAPI))
manager := utxoledger.New(mapdb.NewMapDB(), iotago.SingleVersionProvider(iotago_tpkg.ZeroCostTestAPI))

outputs := utxoledger.Outputs{
tpkg.RandLedgerStateOutputOnAddress(iotago.OutputBasic, iotago_tpkg.RandAddress(iotago.AddressEd25519)),
Expand Down
4 changes: 2 additions & 2 deletions pkg/protocol/engine/utxoledger/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

func TestConfirmationApplyAndRollbackToEmptyLedger(t *testing.T) {
manager := utxoledger.New(mapdb.NewMapDB(), iotago.SingleVersionProvider(iotago_tpkg.TestAPI))
manager := utxoledger.New(mapdb.NewMapDB(), iotago.SingleVersionProvider(iotago_tpkg.ZeroCostTestAPI))

outputs := utxoledger.Outputs{
tpkg.RandLedgerStateOutputWithType(iotago.OutputBasic),
Expand Down Expand Up @@ -88,7 +88,7 @@ func TestConfirmationApplyAndRollbackToEmptyLedger(t *testing.T) {
}

func TestConfirmationApplyAndRollbackToPreviousLedger(t *testing.T) {
manager := utxoledger.New(mapdb.NewMapDB(), iotago.SingleVersionProvider(iotago_tpkg.TestAPI))
manager := utxoledger.New(mapdb.NewMapDB(), iotago.SingleVersionProvider(iotago_tpkg.ZeroCostTestAPI))

previousOutputs := utxoledger.Outputs{
tpkg.RandLedgerStateOutputWithType(iotago.OutputBasic),
Expand Down
Loading

0 comments on commit 287177b

Please sign in to comment.