more refactor
This commit is contained in:
parent
7e45413e3d
commit
03806b2b8c
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user