mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-25 15:55:18 +00:00
remove test case
This commit is contained in:
parent
9932169a67
commit
6a07def455
@ -88,12 +88,6 @@ func (a BaseAuction) Validate() error {
|
||||
if a.EndTime.After(a.MaxEndTime) {
|
||||
return fmt.Errorf("MaxEndTime < EndTime (%s < %s)", a.MaxEndTime, a.EndTime)
|
||||
}
|
||||
if a.HasReceivedBids && !a.Bid.IsPositive() {
|
||||
return fmt.Errorf("cannot have a zero value bid when auction has a true HasReceivedBids flag value")
|
||||
}
|
||||
if !a.HasReceivedBids && a.Bid.IsPositive() {
|
||||
return fmt.Errorf("cannot have a positive value bid when auction has a false HasReceivedBids flag value")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -193,7 +187,7 @@ func NewDebtAuction(buyerModAccName string, bid sdk.Coin, initialLot sdk.Coin, e
|
||||
Lot: initialLot,
|
||||
Bidder: supply.NewModuleAddress(buyerModAccName), // send proceeds from the first bid to the buyer.
|
||||
Bid: bid, // amount that the buyer is buying - doesn't change over course of auction
|
||||
HasReceivedBids: true, // new auctions don't have any bids
|
||||
HasReceivedBids: true,
|
||||
EndTime: endTime,
|
||||
MaxEndTime: endTime,
|
||||
},
|
||||
|
@ -196,34 +196,6 @@ func TestBaseAuctionValidate(t *testing.T) {
|
||||
},
|
||||
false,
|
||||
},
|
||||
{
|
||||
"zero bid with received bids",
|
||||
BaseAuction{
|
||||
ID: 1,
|
||||
Initiator: testAccAddress1,
|
||||
Lot: c("kava", 1),
|
||||
Bidder: addr1,
|
||||
Bid: c("kava", 0),
|
||||
EndTime: now,
|
||||
MaxEndTime: now,
|
||||
HasReceivedBids: true,
|
||||
},
|
||||
false,
|
||||
},
|
||||
{
|
||||
"positive bid without receiving bids",
|
||||
BaseAuction{
|
||||
ID: 1,
|
||||
Initiator: testAccAddress1,
|
||||
Lot: c("kava", 1),
|
||||
Bidder: addr1,
|
||||
Bid: c("kava", 1),
|
||||
EndTime: now,
|
||||
MaxEndTime: now,
|
||||
HasReceivedBids: false,
|
||||
},
|
||||
false,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
|
Loading…
Reference in New Issue
Block a user