Skip to content

Commit

Permalink
make name specific per tx scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenlanders committed Apr 2, 2024
1 parent 9085f64 commit 04654e0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions occ_tests/messages/test_msgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func EVMTransferNonConflicting(tCtx *utils.TestContext, count int) []*utils.Test
var msgs []*utils.TestMessage
for i := 0; i < count; i++ {
testAcct := utils.NewSigner()
msgs = append(msgs, evmTransfer(testAcct, testAcct.EvmAddress))
msgs = append(msgs, evmTransfer(testAcct, testAcct.EvmAddress, "EVMTransferNonConflicting"))
}
return msgs
}
Expand All @@ -72,14 +72,14 @@ func EVMTransferConflicting(tCtx *utils.TestContext, count int) []*utils.TestMes
var msgs []*utils.TestMessage
for i := 0; i < count; i++ {
testAcct := utils.NewSigner()
msgs = append(msgs, evmTransfer(testAcct, tCtx.TestAccounts[0].EvmAddress))
msgs = append(msgs, evmTransfer(testAcct, tCtx.TestAccounts[0].EvmAddress, "EVMTransferConflicting"))
}
return msgs
}

// EVMTransferNonConflicting generates a list of EVM transfer messages that do not conflict with each other
// each message will have a brand new address
func evmTransfer(testAcct utils.TestAcct, to common.Address) *utils.TestMessage {
func evmTransfer(testAcct utils.TestAcct, to common.Address, scenario string) *utils.TestMessage {
signedTx, err := ethtypes.SignTx(ethtypes.NewTx(&ethtypes.DynamicFeeTx{
GasFeeCap: new(big.Int).SetUint64(1000000000000),
GasTipCap: new(big.Int).SetUint64(1000000000000),
Expand All @@ -106,9 +106,9 @@ func evmTransfer(testAcct utils.TestAcct, to common.Address) *utils.TestMessage

return &utils.TestMessage{
Msg: msg,
Type: "EVMTransferNonConflicting",
IsEVM: true,
EVMSigner: testAcct,
Type: scenario,
}
}

Expand Down

0 comments on commit 04654e0

Please sign in to comment.