{"action":"created","issue":{"url":"https://api.github.com/repos/ethereum/go-ethereum/issues/15210","repository_url":"https://api.github.com/repos/ethereum/go-ethereum","labels_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/15210/labels{/name}","comments_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/15210/comments","events_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/15210/events","html_url":"https://github.com/ethereum/go-ethereum/issues/15210","id":260951471,"node_id":"MDU6SXNzdWUyNjA5NTE0NzE=","number":15210,"title":"Get BlockNumber from Transaction","user":{"login":"alehano","id":1269330,"node_id":"MDQ6VXNlcjEyNjkzMzA=","avatar_url":"https://avatars0.githubusercontent.com/u/1269330?v=4","gravatar_id":"","url":"https://api.github.com/users/alehano","html_url":"https://github.com/alehano","followers_url":"https://api.github.com/users/alehano/followers","following_url":"https://api.github.com/users/alehano/following{/other_user}","gists_url":"https://api.github.com/users/alehano/gists{/gist_id}","starred_url":"https://api.github.com/users/alehano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alehano/subscriptions","organizations_url":"https://api.github.com/users/alehano/orgs","repos_url":"https://api.github.com/users/alehano/repos","events_url":"https://api.github.com/users/alehano/events{/privacy}","received_events_url":"https://api.github.com/users/alehano/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2017-09-27T12:14:05Z","updated_at":"2018-07-03T13:38:14Z","closed_at":null,"author_association":"NONE","body":"Why you didn't add BlockNumber to a Transaction struct?\r\nHow can I get Block number by Transaction?"},"comment":{"url":"https://api.github.com/repos/ethereum/go-ethereum/issues/comments/402160303","html_url":"https://github.com/ethereum/go-ethereum/issues/15210#issuecomment-402160303","issue_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/15210","id":402160303,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMjE2MDMwMw==","user":{"login":"maxrobot","id":3975241,"node_id":"MDQ6VXNlcjM5NzUyNDE=","avatar_url":"https://avatars2.githubusercontent.com/u/3975241?v=4","gravatar_id":"","url":"https://api.github.com/users/maxrobot","html_url":"https://github.com/maxrobot","followers_url":"https://api.github.com/users/maxrobot/followers","following_url":"https://api.github.com/users/maxrobot/following{/other_user}","gists_url":"https://api.github.com/users/maxrobot/gists{/gist_id}","starred_url":"https://api.github.com/users/maxrobot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxrobot/subscriptions","organizations_url":"https://api.github.com/users/maxrobot/orgs","repos_url":"https://api.github.com/users/maxrobot/repos","events_url":"https://api.github.com/users/maxrobot/events{/privacy}","received_events_url":"https://api.github.com/users/maxrobot/received_events","type":"User","site_admin":false},"created_at":"2018-07-03T13:38:14Z","updated_at":"2018-07-03T13:38:14Z","author_association":"NONE","body":"@kivutar your changes look good why no PR?\r\n\r\nIs there any strong arguments to not change the way `ethclient: TransactionByHash` works?\r\n\r\nMy proposal:\r\n```\r\n// TransactionByHashModified returns the transaction with the given hash, and the txExtraInfo\r\nfunc (ec *Client) TransactionByHashModified(ctx context.Context, hash common.Hash) (tx *types.Transaction, blockNumber *string, isPending bool, err error) {\r\n\tvar json *rpcTransaction\r\n\terr = ec.c.CallContext(ctx, &json, \"eth_getTransactionByHash\", hash)\r\n\tif err != nil {\r\n\t\treturn nil, nil, false, err\r\n\t} else if json == nil {\r\n\t\treturn nil, nil, false, ethereum.NotFound\r\n\t} else if _, r, _ := json.tx.RawSignatureValues(); r == nil {\r\n\t\treturn nil, nil, false, fmt.Errorf(\"server returned transaction without signature\")\r\n\t}\r\n\tsetSenderFromServer(json.tx, json.From, json.BlockHash)\r\n\treturn json.tx, json.BlockNumber, json.BlockNumber == nil, nil\r\n}\r\n```\r\n\r\nelse could we not simply add the blockhash or number to the `*types.Transaction` struct?"}}
{"actor":{"display_login":"maxrobot"}}