feat(ABCI): New Proposal Struct with Associated Metadata (#126)
* new proto types for proposal info * new proposal type * nits * lane input * lint * feat(ABCI): Deprecating `CheckOrderHandler` with new Proposal MetaData (#127) * refactor without checkorder * nits * more nits * lint * nits * feat(ABCI): Updating MEV lane to have no `CheckOrder` handler + testing (#128) * updating mev lane * nits * preventing adding multiple bid txs in prepare * update
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
package test
|
||||
package testutils
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
+9
-5
@@ -1,4 +1,4 @@
|
||||
package test
|
||||
package testutils
|
||||
|
||||
import (
|
||||
"math/rand"
|
||||
@@ -122,7 +122,7 @@ func CreateFreeTx(txCfg client.TxConfig, account Account, nonce, timeout uint64,
|
||||
return CreateTx(txCfg, account, nonce, timeout, msgs, fees...)
|
||||
}
|
||||
|
||||
func CreateRandomTx(txCfg client.TxConfig, account Account, nonce, numberMsgs, timeout uint64, fees ...sdk.Coin) (authsigning.Tx, error) {
|
||||
func CreateRandomTx(txCfg client.TxConfig, account Account, nonce, numberMsgs, timeout uint64, gasLimit uint64, fees ...sdk.Coin) (authsigning.Tx, error) {
|
||||
msgs := make([]sdk.Msg, numberMsgs)
|
||||
for i := 0; i < int(numberMsgs); i++ {
|
||||
msgs[i] = &banktypes.MsgSend{
|
||||
@@ -152,11 +152,13 @@ func CreateRandomTx(txCfg client.TxConfig, account Account, nonce, numberMsgs, t
|
||||
|
||||
txBuilder.SetFeeAmount(fees)
|
||||
|
||||
txBuilder.SetGasLimit(gasLimit)
|
||||
|
||||
return txBuilder.GetTx(), nil
|
||||
}
|
||||
|
||||
func CreateRandomTxBz(txCfg client.TxConfig, account Account, nonce, numberMsgs, timeout uint64) ([]byte, error) {
|
||||
tx, err := CreateRandomTx(txCfg, account, nonce, numberMsgs, timeout)
|
||||
func CreateRandomTxBz(txCfg client.TxConfig, account Account, nonce, numberMsgs, timeout, gasLimit uint64) ([]byte, error) {
|
||||
tx, err := CreateRandomTx(txCfg, account, nonce, numberMsgs, timeout, gasLimit)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -194,7 +196,7 @@ func CreateTxWithSigners(txCfg client.TxConfig, nonce, timeout uint64, signers [
|
||||
return txBuilder.GetTx(), nil
|
||||
}
|
||||
|
||||
func CreateAuctionTx(txCfg client.TxConfig, bidder Account, bid sdk.Coin, nonce, timeout uint64, signers []Account) (authsigning.Tx, []authsigning.Tx, error) {
|
||||
func CreateAuctionTx(txCfg client.TxConfig, bidder Account, bid sdk.Coin, nonce, timeout uint64, signers []Account, gasLimit uint64) (authsigning.Tx, []authsigning.Tx, error) {
|
||||
bidMsg := &auctiontypes.MsgAuctionBid{
|
||||
Bidder: bidder.Address.String(),
|
||||
Bid: bid,
|
||||
@@ -238,6 +240,8 @@ func CreateAuctionTx(txCfg client.TxConfig, bidder Account, bid sdk.Coin, nonce,
|
||||
|
||||
txBuilder.SetTimeoutHeight(timeout)
|
||||
|
||||
txBuilder.SetGasLimit(gasLimit)
|
||||
|
||||
return txBuilder.GetTx(), txs, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user