74: Add first e2e test for post-Merge indexing #79

Merged
telackey merged 7 commits from telackey/e2e_test into main 2022-10-11 20:46:20 +00:00
Showing only changes of commit 03806b2b8c - Show all commits

View File

@ -36,8 +36,6 @@ var _ = Describe("e2emerge", Label("e2e"), func() {
go bc.CaptureHead() go bc.CaptureHead()
tx, _ := sendTestTx() 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) beaconBlock := waitForTxToBeIndexed(bc.Db, tx)
Expect(beaconBlock).ToNot(BeNil()) Expect(beaconBlock).ToNot(BeNil())
@ -139,13 +137,15 @@ func sendTestTx() (*SentTx, error) {
time.Sleep(time.Second) time.Sleep(time.Second)
receipt, _ := eth.TransactionReceipt(ctx, tx.Hash()) receipt, _ := eth.TransactionReceipt(ctx, tx.Hash())
if nil != receipt { if nil != receipt {
return &SentTx{ sentTx := &SentTx{
hash: tx.Hash().String(), hash: tx.Hash().String(),
raw: txBin, raw: txBin,
blockNo: receipt.BlockNumber.Uint64(), blockNo: receipt.BlockNumber.Uint64(),
blockHash: receipt.BlockHash.String(), blockHash: receipt.BlockHash.String(),
txIndex: receipt.TransactionIndex, 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
} }
} }