[ENG-682]: Refactoring auction mempool to ingress normal sdk txs (#50)

This commit is contained in:
David Terpay
2023-04-06 11:13:44 -04:00
committed by GitHub
parent d3a198a710
commit cc3012a129
6 changed files with 19 additions and 62 deletions
+7 -3
View File
@@ -83,7 +83,12 @@ func (ad BuilderDecorator) GetTopAuctionBid(ctx sdk.Context) (sdk.Coin, error) {
return sdk.Coin{}, nil
}
return auctionTx.(*mempool.WrappedBidTx).GetBid(), nil
msgAuctionBid, err := mempool.GetMsgAuctionBidFromTx(auctionTx)
if err != nil {
return sdk.Coin{}, err
}
return msgAuctionBid.Bid, nil
}
// IsTopBidTx returns true if the transaction inputted is the highest bidding auction transaction in the mempool.
@@ -93,8 +98,7 @@ func (ad BuilderDecorator) IsTopBidTx(ctx sdk.Context, tx sdk.Tx) (bool, error)
return false, nil
}
topBidTx := mempool.UnwrapBidTx(auctionTx)
topBidBz, err := ad.txEncoder(topBidTx)
topBidBz, err := ad.txEncoder(auctionTx)
if err != nil {
return false, err
}