eth/catalyst: avoid copying tx in test

This commit is contained in:
Felix Lange 2024-04-04 12:30:51 +02:00
parent a38de14ab6
commit 6c37fdf281

View file

@ -74,7 +74,7 @@ func startSimulatedBeaconEthService(t *testing.T, genesis *core.Genesis) (*node.
// send enough transactions to fill multiple blocks // send enough transactions to fill multiple blocks
func TestSimulatedBeaconSendWithdrawals(t *testing.T) { func TestSimulatedBeaconSendWithdrawals(t *testing.T) {
var withdrawals []types.Withdrawal var withdrawals []types.Withdrawal
txs := make(map[common.Hash]types.Transaction) txs := make(map[common.Hash]*types.Transaction)
var ( var (
// testKey is a private key to use for funding a tester account. // testKey is a private key to use for funding a tester account.
@ -110,7 +110,7 @@ func TestSimulatedBeaconSendWithdrawals(t *testing.T) {
if err != nil { if err != nil {
t.Fatalf("error signing transaction, err=%v", err) t.Fatalf("error signing transaction, err=%v", err)
} }
txs[tx.Hash()] = *tx txs[tx.Hash()] = tx
if err := ethService.APIBackend.SendTx(context.Background(), tx); err != nil { if err := ethService.APIBackend.SendTx(context.Background(), tx); err != nil {
t.Fatal("SendTx failed", err) t.Fatal("SendTx failed", err)