mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 11:26:44 +01:00
Fix repeated items when coordinator is updated
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"strconv"
|
||||
"testing"
|
||||
|
||||
ethCommon "github.com/ethereum/go-ethereum/common"
|
||||
"github.com/hermeznetwork/hermez-node/common"
|
||||
"github.com/hermeznetwork/hermez-node/db/historydb"
|
||||
"github.com/mitchellh/copystructure"
|
||||
@@ -148,7 +149,12 @@ func TestGetSlots(t *testing.T) {
|
||||
// maxSlotNum & wonByEthereumAddress
|
||||
fetchedSlots = []testSlot{}
|
||||
limit = 1
|
||||
bidderAddr := tc.coordinators[0].Bidder
|
||||
var bidderAddr ethCommon.Address
|
||||
for i := 0; i < len(tc.slots); i++ {
|
||||
if tc.slots[i].WinnerBid != nil {
|
||||
bidderAddr = tc.slots[i].WinnerBid.Bidder
|
||||
}
|
||||
}
|
||||
path = fmt.Sprintf("%s?maxSlotNum=%d&wonByEthereumAddress=%s&limit=%d", endpoint, maxSlotNum, bidderAddr.String(), limit)
|
||||
err = doGoodReqPaginated(path, historydb.OrderAsc, &testSlotsResponse{}, appendIter)
|
||||
assert.NoError(t, err)
|
||||
|
||||
Reference in New Issue
Block a user