From 03806b2b8c4b554801260f7a3fdf501be0344995 Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Fri, 7 Oct 2022 15:45:13 -0500 Subject: [PATCH] more refactor --- pkg/beaconclient/e2emerge_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/beaconclient/e2emerge_test.go b/pkg/beaconclient/e2emerge_test.go index 263be0f..18bb1b8 100644 --- a/pkg/beaconclient/e2emerge_test.go +++ b/pkg/beaconclient/e2emerge_test.go @@ -36,8 +36,6 @@ var _ = Describe("e2emerge", Label("e2e"), func() { go bc.CaptureHead() tx, _ := sendTestTx() - log.Debugf("Sent ETH1 TX %s (Block No: %d, Block Hash: %s)", - tx.hash, tx.blockNo, tx.blockHash) beaconBlock := waitForTxToBeIndexed(bc.Db, tx) Expect(beaconBlock).ToNot(BeNil()) @@ -139,13 +137,15 @@ func sendTestTx() (*SentTx, error) { time.Sleep(time.Second) receipt, _ := eth.TransactionReceipt(ctx, tx.Hash()) if nil != receipt { - return &SentTx{ + sentTx := &SentTx{ hash: tx.Hash().String(), raw: txBin, blockNo: receipt.BlockNumber.Uint64(), blockHash: receipt.BlockHash.String(), txIndex: receipt.TransactionIndex, - }, nil + } + log.Debugf("Sent ETH1 TX %s (Block No: %d, Block Hash: %s)", sentTx.hash, sentTx.blockNo, sentTx.blockHash) + return sentTx, nil } }