eth_sendRawTransactionSync (rpc/jsonrpc/send_transaction.go:114, main at 52b071b) checks the receipt before waiting on the receipts subscription:
if receipt, err := api.GetTransactionReceipt(ctx, hash); err != nil && receipt != nil {
return receipt, nil
}
GetTransactionReceipt never returns a receipt together with an error, so this branch never runs. A transaction that is mined before the receipts filter attaches waits for the full timeout, although eth_getTransactionReceipt already returns it.
Fix: err == nil && receipt != nil, plus a test for a transaction that is already mined when the call starts. Found in the review of #23969.
eth_sendRawTransactionSync(rpc/jsonrpc/send_transaction.go:114,mainat 52b071b) checks the receipt before waiting on the receipts subscription:GetTransactionReceiptnever returns a receipt together with an error, so this branch never runs. A transaction that is mined before the receipts filter attaches waits for the full timeout, althougheth_getTransactionReceiptalready returns it.Fix:
err == nil && receipt != nil, plus a test for a transaction that is already mined when the call starts. Found in the review of #23969.