Skip to content

Commit

Permalink
stellar#4909: removed stub loader Sealed() method for test purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
sreuland committed Oct 26, 2023
1 parent dd30b6a commit 625ce1f
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 15 deletions.
5 changes: 1 addition & 4 deletions services/horizon/internal/db2/history/account_loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,6 @@ func NewAccountLoaderStub() AccountLoaderStub {
// Insert updates the wrapped AccountLoader so that the given account
// address is mapped to the provided history account id
func (a AccountLoaderStub) Insert(address string, id int64) {
a.Loader.ids[address] = id
}

func (a AccountLoaderStub) Sealed() {
a.Loader.sealed = true
a.Loader.ids[address] = id
}
5 changes: 1 addition & 4 deletions services/horizon/internal/db2/history/asset_loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,6 @@ func NewAssetLoaderStub() AssetLoaderStub {
// Insert updates the wrapped AssetLoaderStub so that the given asset
// address is mapped to the provided history asset id
func (a AssetLoaderStub) Insert(asset AssetKey, id int64) {
a.Loader.ids[asset] = id
}

func (a AssetLoaderStub) Sealed() {
a.Loader.sealed = true
a.Loader.ids[asset] = id
}
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,6 @@ func NewLiquidityPoolLoaderStub() LiquidityPoolLoaderStub {
// Insert updates the wrapped LiquidityPoolLoader so that the given liquidity pool
// is mapped to the provided history liquidity pool id
func (a LiquidityPoolLoaderStub) Insert(lp string, id int64) {
a.Loader.ids[lp] = id
}

func (a LiquidityPoolLoaderStub) Sealed() {
a.Loader.sealed = true
a.Loader.ids[lp] = id
}
Original file line number Diff line number Diff line change
Expand Up @@ -727,15 +727,12 @@ func (s *TradeProcessorTestSuiteLedger) mockReadTradeTransactions() []history.In
}

func (s *TradeProcessorTestSuiteLedger) stubLoaders() {
s.accountLoader.Sealed()
for key, id := range s.unmuxedAccountToID {
s.accountLoader.Insert(key, id)
}
s.assetLoader.Sealed()
for key, id := range s.assetToID {
s.assetLoader.Insert(key, id.ID)
}
s.lpLoader.Sealed()
for key, id := range s.lpToID {
s.lpLoader.Insert(PoolIDToString(key), id)
}
Expand Down

0 comments on commit 625ce1f

Please sign in to comment.