From 780650f8e1a7a6bccead084fa6c5bf683bc02774 Mon Sep 17 00:00:00 2001 From: egonspace Date: Thu, 23 May 2024 11:06:19 +0900 Subject: [PATCH] fix: add debugging code --- ethclient/ethclient_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ethclient/ethclient_test.go b/ethclient/ethclient_test.go index dd01c08f539e..2ee240d398b4 100644 --- a/ethclient/ethclient_test.go +++ b/ethclient/ethclient_test.go @@ -404,6 +404,9 @@ func testTransactionInBlockInterrupted(t *testing.T, client *rpc.Client) { // Test tx in block interupted. ctx, cancel := context.WithCancel(context.Background()) cancel() + if ctx.Err() != context.Canceled { + t.Fatal("context is not canceled") + } tx, err := ec.TransactionInBlock(ctx, block.Hash(), 0) if tx != nil { t.Fatal("transaction should be nil")