Integrate til into api

This commit is contained in:
Arnau B
2020-11-16 18:10:43 +01:00
parent b3b23473b6
commit ce1218e28a
19 changed files with 583 additions and 766 deletions

View File

@@ -17,7 +17,7 @@ type testSlot struct {
FirstBlock int64 `json:"firstBlock"`
LastBlock int64 `json:"lastBlock"`
OpenAuction bool `json:"openAuction"`
WinnerBid *testBid `json:"winnerBid"`
WinnerBid *testBid `json:"bestBid"`
}
type testSlotsResponse struct {
@@ -35,6 +35,8 @@ func (t testSlotsResponse) Len() int {
return len(t.Slots)
}
func (t testSlotsResponse) New() Pendinger { return &testSlotsResponse{} }
func (a *API) genTestSlots(nSlots int, lastBlockNum int64, bids []testBid, auctionVars common.AuctionVariables) []testSlot {
tSlots := []testSlot{}
bestBids := make(map[int64]testBid)