@@ -125,10 +125,12 @@ func TestWaitDeployedCornerCases(t *testing.T) {
125125 // Create a transaction to an account.
126126 code := "6060604052600a8060106000396000f360606040526008565b00"
127127 tx := types .NewTransaction (0 , common .HexToAddress ("0x01" ), big .NewInt (0 ), 3000000 , gasPrice , common .FromHex (code ))
128- tx , _ = types .SignTx (tx , types .LatestSigner ( params . TestChainConfig ), testKey )
128+ tx , _ = types .SignTx (tx , types .LatestSignerForChainID ( big . NewInt ( 1337 ) ), testKey )
129129 ctx , cancel := context .WithCancel (context .Background ())
130130 defer cancel ()
131- backend .Client ().SendTransaction (ctx , tx )
131+ if err := backend .Client ().SendTransaction (ctx , tx ); err != nil {
132+ t .Fatalf ("Failed to send transaction: %s" , err )
133+ }
132134 backend .Commit (true )
133135 notContractCreation := errors .New ("tx is not contract creation" )
134136 if _ , err := bind .WaitDeployed (ctx , backend .Client (), tx ); err .Error () != notContractCreation .Error () {
@@ -137,7 +139,7 @@ func TestWaitDeployedCornerCases(t *testing.T) {
137139
138140 // Create a transaction that is not mined.
139141 tx = types .NewContractCreation (1 , big .NewInt (0 ), 3000000 , gasPrice , common .FromHex (code ))
140- tx , _ = types .SignTx (tx , types .LatestSigner ( params . TestChainConfig ), testKey )
142+ tx , _ = types .SignTx (tx , types .LatestSignerForChainID ( big . NewInt ( 1337 ) ), testKey )
141143
142144 go func () {
143145 contextCanceled := errors .New ("context canceled" )
@@ -146,6 +148,8 @@ func TestWaitDeployedCornerCases(t *testing.T) {
146148 }
147149 }()
148150
149- backend .Client ().SendTransaction (ctx , tx )
151+ if err := backend .Client ().SendTransaction (ctx , tx ); err != nil {
152+ t .Fatalf ("Failed to send transaction: %s" , err )
153+ }
150154 cancel ()
151155}
0 commit comments